Function at 0x51f060
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5792e8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d7050]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
lea esi, [esp + 0x18]
call fcn.0051ea50
mov dword [esp + 0x2c], 0
call fcn.005228b0
call fcn.0041b600
mov dword [0x61976c], eax
call fcn.00522a30
mov esi, dword [esp + 0x1c]
xor ecx, ecx
mov edi, 1
cmp eax, edi
setl cl
test esi, esi
mov dword [0x619770], ecx
je 0x51f120
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
push str.kwifi_create_result
mov ecx, esi
call eax
mov eax, dword [esp + 0x34]
mov edx, dword [esi]
mov edx, dword [edx + 0x14]
push eax
push str.create_type
mov ecx, esi
call edx
mov ecx, dword [esp + 0x38]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.result
mov ecx, esi
call edx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.errcode
mov ecx, esi
call edx
mov ecx, dword [esp + 0x40]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.errshow
mov ecx, esi
call edx
mov eax, 0x586ad0
mov ecx, 0x619774
call fcn.00498ad0
neg eax
sbb eax, eax
add eax, 1
test esi, esi
je 0x51f149
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x14]
push str.wlancard
mov ecx, esi
call eax
test byte [0x6198b8], 1
jne 0x51f15d
or dword [0x6198b8], edi
call fcn.0043b8d0
mov eax, 0x619894
call fcn.00445710
sub eax, edi
neg eax
sbb eax, eax
add eax, 1
test esi, esi
je 0x51f22c
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x14]
push str.isnewcreate
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push 0
push str.create_time
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push 0
push str.isonline
mov ecx, esi
call eax
mov eax, dword [esp + 0x44]
mov edx, dword [esi]
mov edx, dword [edx + 0x14]
push eax
push str.create_equipment
mov ecx, esi
call edx
mov ecx, dword [esp + 0x48]
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push ecx
push str.netcard
mov ecx, esi
call edx
mov ecx, dword [esp + 0x4c]
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push ecx
push str.netdriver
mov ecx, esi
call edx
mov ecx, dword [esp + 0x50]
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push ecx
push str.hardwareid
mov ecx, esi
call edx
mov ecx, dword [esp + 0x54]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.isrebootwifi
mov ecx, esi
call edx
mov ecx, dword [esp + 0x58]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.create_ntime
mov ecx, esi
call edx
mov ecx, dword [esp + 0x5c]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.openfailed
mov ecx, esi
call edx
test byte [0x6199c8], 1
jne 0x51f24d
or dword [0x6199c8], edi
call fcn.0046c480
push 0x580670
call fcn.0056a011
add esp, 4
test esi, esi
je 0x51f266
mov ecx, dword [0x6199ec]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.ap_type
mov ecx, esi
call edx
mov eax, dword [0x5e736c]
mov edx, dword [eax + 0xc]
mov ecx, 0x5e736c
call edx
add eax, 0x10
mov dword [esp + 0x34], eax
mov byte [esp + 0x2c], 1
mov eax, dword [0x5e736c]
mov edx, dword [eax + 0xc]
mov ecx, 0x5e736c
call edx
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x2c], 2
test byte [0x6199c8], 1
jne 0x51f2bd
or dword [0x6199c8], edi
call fcn.0046c480
push 0x580670
call fcn.0056a011
add esp, 4
mov eax, 0x6199f4
lea edi, [esp + 0x34]
call fcn.004101e0
mov eax, 0x6199f8
lea edi, [esp + 0x38]
call fcn.004101e0
test esi, esi
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
je 0x51f326
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push ebp
push str.chipid
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push ebx
push str.chiptype
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push 3
push 0x5ad968
mov ecx, esi
call edx
mov ecx, dword [esp + 0x68]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.aperror
mov ecx, esi
call edx
call fcn.0043a500
test esi, esi
movzx eax, al
je 0x51f3d9
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x14]
push str.explorer
mov ecx, esi
call eax
mov eax, dword [esp + 0x60]
mov edx, dword [esi]
mov edx, dword [edx + 0x18]
push eax
push str.kwifi_ver
mov ecx, esi
call edx
mov ecx, dword [esp + 0x64]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.create_result
mov ecx, esi
call edx
mov ecx, dword [esp + 0x6c]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.vwifi_err
mov ecx, esi
call edx
mov ecx, dword [esp + 0x70]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.share_type
mov ecx, esi
call edx
mov ecx, dword [esp + 0x74]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.share_errcode
mov ecx, esi
call edx
mov ecx, dword [esp + 0x78]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.share_result
mov ecx, esi
call edx
mov ecx, dword [esp + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push ecx
push str.kwifi_netmode
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x20]
push 0
mov ecx, esi
call edx
mov edi, eax
jmp 0x51f3db
xor edi, edi
lea eax, [ebp - 0x10]
mov byte [esp + 0x2c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51f3fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x2c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x51f41d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
mov dword [esp + 0x2c], 0xffffffff
je 0x51f432
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, edi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x4c