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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5aca60
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x62d12c]
xor eax, esp
mov dword [esp + 0x128], eax
push ebx
push esi
push edi
mov eax, dword [0x62d12c]
xor eax, esp
push eax
lea eax, [esp + 0x140]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, ecx
mov ecx, 8
mov dword [esp + 0x30], eax
cmp dword [edi + 0x4c], ecx
jb 0x4061c8
mov edx, dword [edi + 0x38]
jmp 0x4061cb
lea edx, [edi + 0x38]
cmp dword [edi + 0x68], ecx
lea eax, [edi + 0x54]
jb 0x4061d5
mov eax, dword [eax]
push 0
push 0x5e3368
push 0
push eax
lea ecx, [esp + 0x9c]
push ecx
call fcn.00402ed0
push 0x20019
push 0
push str.SoftwareResearch_In_MotionDevice_Manager
mov dword [esp + 0x154], 0
push SysReAllocStringLen
lea ecx, [esp + 0x30]
mov dword [esp + 0x28], 0x9c40
mov esi, 0x2ee0
mov ebx, 0x3a98
call fcn.004e4a10
mov byte [esp + 0x148], 1
cmp dword [esp + 0x28], 0
je 0x406302
lea edx, [esp + 0x14]
push edx
push str.RndisTimeoutDiscovery
lea ecx, [esp + 0x28]
mov dword [esp + 0x1c], 0
call fcn.004e4910
test al, al
je 0x406282
mov eax, dword [esp + 0x14]
imul eax, eax, 0x3e8
mov dword [esp + 0x14], eax
cmp eax, 0x9c40
jbe 0x406282
push eax
push str._DeviceIPControlChannel::detect_control_channel__Override_discovery_timeout.__NewValue:__d
push 1
call fcn.005304d0
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x14]
push ecx
push str.RndisTimeoutDiscoveryAttempt
lea ecx, [esp + 0x28]
call fcn.004e4910
test al, al
je 0x4062c2
mov eax, dword [esp + 0x14]
imul eax, eax, 0x3e8
mov dword [esp + 0x14], eax
cmp eax, 0x2ee0
jbe 0x4062c2
push eax
push str._DeviceIPControlChannel::detect_control_channel__Override_discovery_attempt_timeout.__NewValue:__d
push 1
call fcn.005304d0
mov esi, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x14]
push edx
push str.RndisTimeoutDiscoveryRoute
lea ecx, [esp + 0x28]
call fcn.004e4910
test al, al
je 0x406302
mov eax, dword [esp + 0x14]
imul eax, eax, 0x3e8
mov dword [esp + 0x14], eax
cmp eax, 0x3a98
jbe 0x406302
push eax
push str._DeviceIPControlChannel::detect_control_channel__Override_discovery_attempt_timeout.__NewValue:__d
push 1
call fcn.005304d0
mov ebx, dword [esp + 0x20]
add esp, 0xc
mov eax, 0x1f4
mov byte [esp + 0x10c], 1
mov dword [esp + 0xfc], eax
mov dword [esp + 0x100], esi
mov dword [esp + 0x104], eax
mov dword [esp + 0x108], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, ebx
mov edx, edi
mov dword [esp + 0x14], eax
call fcn.0040ec30
lea esi, [esp + 0x8c]
call fcn.00403150
test al, al
jne 0x406384
push str._DeviceIPControlChannel::detect_control_channel__HttpSession::Connect_failed.
push 1
call fcn.005304d0
add esp, 8
mov byte [esp + 0x148], 0
lea ecx, [esp + 0x20]
call fcn.004e4860
lea ecx, [esp + 0x8c]
call fcn.00403030
mov eax, 8
jmp 0x40691d
push 9
xor eax, eax
xor esi, esi
push str._cgi_bin_
lea ecx, [esp + 0x40]
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], esi
mov word [esp + 0x40], ax
call fcn.00422a20
push 0xd
push str.discovery.cgi
lea ecx, [esp + 0x40]
mov byte [esp + 0x150], 2
call fcn.00416d10
mov dword [esp + 0x34], esi
mov byte [esp + 0x148], 3
mov ecx, dword [edi + 0x70]
mov edx, dword [ecx]
mov eax, dword [edx + 0x44]
call eax
test al, al
je 0x406462
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x4c], 8
mov eax, dword [esp + 0x38]
jae 0x4063f4
lea eax, [esp + 0x38]
lea ecx, [esp + 0x34]
push ecx
push esi
push esi
push esi
push esi
push eax
lea edx, [esp + 0xa4]
push edx
call fcn.004044d0
cmp al, 1
je 0x40645a
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.004e5540
add esp, 8
test al, al
jne 0x40644b
push str._DeviceIPControlChannel::detect_control_channel__HttpSession::sendGetRequest_failed___Retry
push 3
call fcn.005304d0
add esp, 8
push 0xfa
call ebx
mov ecx, dword [edi + 0x70]
mov edx, dword [ecx]
mov eax, dword [edx + 0x44]
call eax
test al, al
jne 0x4063e5
jmp 0x40645a
push str._DeviceIPControlChannel::detect_control_channel__HttpSession::sendGetRequest_failed._timeout_period_exceeded.
push 1
call fcn.005304d0
add esp, 8
mov ebx, dword [esp + 0x34]
cmp ebx, esi
jne 0x4064bf
mov edi, dword [edi + 0x70]
mov edx, dword [edi]
mov eax, dword [edx + 0x44]
mov ecx, edi
call eax
test al, al
mov eax, 0x5e812c
jne 0x40647c
mov eax, 0x5e8124
push eax
push str._DeviceIPControlChannel::detect_control_channel__HttpSession::sendGetRequest_requests_failed._Device_Attached:__s
push 1
call fcn.005304d0
add esp, 0xc
cmp dword [esp + 0x4c], 8
jb 0x4064a0
mov ecx, dword [esp + 0x38]
push ecx
call fcn.00558723
add esp, 4
xor edx, edx
mov dword [esp + 0x4c], 7
mov dword [esp + 0x48], esi
mov word [esp + 0x38], dx
mov byte [esp + 0x148], dl
jmp 0x406365
mov edi, 7
xor eax, eax
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], esi
mov word [esp + 0x54], ax
mov byte [esp + 0x148], 4
mov edx, dword [ebx]
mov edx, dword [edx + 0x3c]
lea eax, [esp + 0x54]
push eax
push 0x637368
mov ecx, ebx
call edx
cmp al, 1
jne 0x406896
cmp dword [0x62fe30], 8
mov eax, dword [0x62fe1c]
jae 0x406509
mov eax, 0x62fe1c
mov ecx, dword [0x62fe2c]
mov edx, dword [esp + 0x64]
push ecx
push eax
push edx
push esi
lea ecx, [esp + 0x64]
call fcn.0041c5b0
test eax, eax
jne 0x406602
mov dword [esp + 0x18], esi
mov dword [esp + 0x84], edi
mov dword [esp + 0x80], esi
mov word [esp + 0x70], ax
lea ecx, [esp + 0x70]
push ecx
push ecx
mov byte [esp + 0x150], 5
mov eax, esp
mov dword [eax], ebx
mov edx, dword [ebx]
mov eax, dword [edx + 4]
mov ecx, ebx
lea esi, [esp + 0x20]
mov edi, 0x63734c
mov dword [esp + 0x38], esp
call eax
mov edx, esi
mov ecx, edi
call fcn.00424210
add esp, 8
test al, al
jne 0x406588
push str._DeviceIPControlChannel::detect_control_channel__Unable_to_extract_Discovery_error_information
push 1
call fcn.005304d0
add esp, 8
jmp 0x4065af
cmp dword [esp + 0x84], 8
mov eax, dword [esp + 0x70]
jae 0x40659a
lea eax, [esp + 0x70]
mov ecx, dword [esp + 0x18]
push eax
push ecx
push str._DeviceIPControlChannel::detect_control_channel__Device_Discovery_error_returned.__Error:__d_Message:__S
push 1
call fcn.005304d0
add esp, 0x10
lea ecx, [esp + 0x70]
call fcn.004222c0
lea ecx, [esp + 0x54]
call fcn.004222c0
mov byte [esp + 0x148], 2
mov edx, dword [ebx]
mov eax, dword [edx + 8]
mov ecx, ebx
call eax
lea ecx, [esp + 0x38]
call fcn.004222c0
lea ecx, [esp + 0x20]
mov byte [esp + 0x148], 0
call fcn.004e4860
lea ecx, [esp + 0x8c]
call fcn.00403030
mov eax, 0x17
jmp 0x40691d
mov eax, dword [0x62fe00]
mov edi, 8
cmp dword [0x62fe14], edi
jae 0x406619
mov eax, 0x62fe00
mov ecx, dword [0x62fe10]
mov edx, dword [esp + 0x64]
push ecx
push eax
push edx
push esi
lea ecx, [esp + 0x64]
call fcn.0041c5b0
test eax, eax
jne 0x40684b
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], esi
push 0x5e4ed4
lea eax, [esp + 0x120]
push 0x637330
push eax
mov byte [esp + 0x154], 6
call fcn.0041a290
add esp, 0xc
mov byte [esp + 0x148], 7
cmp dword [eax + 0x14], edi
jb 0x406675
mov eax, dword [eax]
mov edx, dword [ebx]
mov edx, dword [edx + 0x2c]
lea ecx, [esp + 0x70]
push ecx
push eax
mov ecx, ebx
call edx
test al, al
lea ecx, [esp + 0x11c]
sete byte [esp + 0x1f]
mov byte [esp + 0x148], 6
call fcn.004222c0
cmp byte [esp + 0x1f], 0
je 0x4066ee
push str._DeviceIPControlChannel::detect_control_channel__Unable_to_locate_discovery_property_elements
push 1
call fcn.005304d0
add esp, 8
lea ecx, [esp + 0x70]
call fcn.00412f00
lea ecx, [esp + 0x54]
call fcn.004222c0
mov byte [esp + 0x148], 2
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
call edx
lea ecx, [esp + 0x38]
call fcn.004222c0
mov byte [esp + 0x148], 0
jmp 0x406903
mov dword [esp + 0x14], esi
lea esi, [esp + 0x14]
mov byte [esp + 0x148], 8
call fcn.00427540
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
sub ecx, eax
xor edi, edi
sar ecx, 2
mov dword [esp + 0x18], edi
test ecx, ecx
je 0x4067b7
mov edi, edi
cmp dword [0x62fe84], 8
mov ecx, dword [eax + edi*4]
mov esi, dword [0x62fe70]
jae 0x406737
mov esi, 0x62fe70
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
mov edi, edi
mov cx, word [eax]
cmp cx, word [esi]
jne 0x406766
test cx, cx
je 0x406762
mov cx, word [eax + 2]
cmp cx, word [esi + 2]
jne 0x406766
add eax, 4
add esi, 4
test cx, cx
jne 0x406740
xor eax, eax
jmp 0x40676b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40679d
mov ecx, dword [esp + 0x70]
mov esi, dword [ecx + edi*4]
mov edx, dword [esp + 0x14]
mov eax, dword [esi]
mov edi, dword [edx]
mov edx, dword [eax + 0x18]
mov ecx, esi
call edx
push eax
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov ecx, esi
call edx
mov ecx, dword [esp + 0x18]
push eax
mov eax, dword [edi + 0x24]
call eax
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
sub ecx, eax
inc edi
sar ecx, 2
mov dword [esp + 0x18], edi
cmp edi, ecx
jb 0x406720
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x70]
mov dword [eax], edx
call fcn.00412f00
cmp dword [esp + 0x68], 8
jb 0x4067de
mov ecx, dword [esp + 0x54]
push ecx
call fcn.00558723
add esp, 4
xor edx, edx
mov esi, 7
xor edi, edi
mov word [esp + 0x54], dx
mov byte [esp + 0x148], 2
mov dword [esp + 0x68], esi
mov dword [esp + 0x64], edi
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
call edx
cmp dword [esp + 0x4c], 8
jb 0x406819
mov eax, dword [esp + 0x38]
push eax
call fcn.00558723
add esp, 4
xor ecx, ecx
mov word [esp + 0x38], cx
mov byte [esp + 0x148], cl
lea ecx, [esp + 0x20]
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], edi
call fcn.004e4860
lea ecx, [esp + 0x8c]
call fcn.00403030
xor eax, eax
jmp 0x40691d
mov eax, dword [esp + 0x54]
cmp dword [esp + 0x68], edi
jae 0x406859
lea eax, [esp + 0x54]
push eax
push str._DeviceIPControlChannel::detect_control_channel__Unknown_status_returned._Value:__S
push 1
call fcn.005304d0
add esp, 0xc
lea ecx, [esp + 0x54]
call fcn.004222c0
mov byte [esp + 0x148], 2
mov edx, dword [ebx]
mov eax, dword [edx + 8]
mov ecx, ebx
call eax
lea ecx, [esp + 0x38]
call fcn.004222c0
mov byte [esp + 0x148], 0
jmp 0x406903
push str._DeviceIPControlChannel::detect_control_channel__Error_parsing_device_discovery_response.
push 1
call fcn.005304d0
add esp, 8
cmp dword [esp + 0x68], 8
jb 0x4068b9
mov ecx, dword [esp + 0x54]
push ecx
call fcn.00558723
add esp, 4
xor edx, edx
mov word [esp + 0x54], dx
mov byte [esp + 0x148], 2
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], esi
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
call edx
cmp dword [esp + 0x4c], 8
jb 0x4068ed
mov eax, dword [esp + 0x38]
push eax
call fcn.00558723
add esp, 4
xor ecx, ecx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], esi
mov word [esp + 0x38], cx
mov byte [esp + 0x148], cl
lea ecx, [esp + 0x20]
call fcn.004e4860
lea ecx, [esp + 0x8c]
call fcn.00403030
mov eax, 0x16
mov ecx, dword [esp + 0x140]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.00558b78
mov esp, ebp
pop ebp
ret 4