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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1ac
mov ebp, ecx
mov edi, dword [esp + 0x1c0]
lea esi, [esp + 0xab]
push 0x101
push 0
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
call fcn.004a72a0
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
test edi, edi
je 0x4787d1
test byte [edi], 1
je 0x4787bd
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x4787bd
push dword [edi + 8]
call fcn.00420e70
add esp, 4
mov dword [edi + 4], 0
mov dword [edi], 0
mov dword [edi + 8], 0
lea eax, [ebp + 8]
mov dword [esp + 0x1c], eax
lea eax, [edi + 1]
mov dword [esp + 0x54], eax
jmp 0x478804
push dword [esp + 8]
call fcn.00420e70
add esp, 4
test bl, bl
je 0x479004
call fcn.004a72a0
sub eax, dword [esp + 0x24]
sbb edx, dword [esp + 0x20]
mov ecx, 0xfc23abff
cmp ecx, eax
mov eax, 6
sbb eax, edx
jl 0x478f50
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
push 0x100
push esi
call dword [eax + 8]
test eax, eax
js 0x478f5d
mov byte [esp + eax + 0xab], 0
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], 0
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
cmp eax, 0xfffffff0
jae 0x479015
mov ebx, eax
cmp eax, 0xb
jae 0x478890
mov eax, ebx
add al, bl
mov byte [esp], al
lea esi, [esp + 1]
test ebx, ebx
jne 0x4788bc
jmp 0x4788ce
mov edi, ebp
mov ebp, ebx
or ebp, 0xf
lea eax, [ebp + 1]
push eax
call fcn.00420cd0
add esp, 4
mov esi, eax
mov dword [esp + 8], eax
add ebp, 2
mov dword [esp], ebp
mov ebp, edi
mov edi, dword [esp + 0x1c0]
mov dword [esp + 4], ebx
push ebx
lea eax, [esp + 0xaf]
push eax
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov byte [esi + ebx], 0
movzx eax, byte [esp]
test al, 1
je 0x4788f0
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x4788f6
shr eax, 1
lea ecx, [esp + 1]
lea esi, [esp + 0xab]
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa0], ecx
mov dword [esp + 0x98], str.INFO
mov dword [esp + 0x9c], 4
sub esp, 0x10
movsd xmm0, qword [esp + 0xa8]
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0xb0]
movsd qword [esp], xmm0
call fcn.0042b080
add esp, 0x10
test al, al
je 0x478a50
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], 0
lea ebx, [esp + 0xc]
mov ecx, ebx
mov eax, esp
push eax
push 0xffffffffffffffff
push 4
push eax
call fcn.004242a0
mov ecx, dword [ebp + 0x58]
test ecx, ecx
je 0x47901c
mov eax, dword [ecx]
push ebx
call dword [eax + 0x18]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
movsd xmm0, qword [esp + 0xc]
movsd qword [esp + 0x30], xmm0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], 0
mov ecx, dword [esp + 0x1c4]
test ecx, ecx
je 0x4789fd
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 8]
jae 0x478b42
mov edx, dword [esp + 0x38]
mov dword [eax + 8], edx
movsd xmm0, qword [esp + 0x30]
movsd qword [eax], xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0
add dword [ecx + 4], 0xc
test byte [esp + 0x30], 1
je 0x478a10
push dword [esp + 0x38]
call fcn.00420e70
add esp, 4
call fcn.004a72a0
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
test byte [esp + 0xc], 1
je 0x478a30
push dword [esp + 0x14]
call fcn.00420e70
add esp, 4
mov bl, 1
test byte [esp], 1
je 0x4787fc
jmp 0x4787f0
movzx eax, byte [esp]
test al, 1
je 0x478a70
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x478a76
shr eax, 1
lea ecx, [esp + 1]
mov dword [esp + 0x94], eax
mov dword [esp + 0x90], ecx
mov dword [esp + 0x88], str.OKAY
mov dword [esp + 0x8c], 4
sub esp, 0x10
movsd xmm0, qword [esp + 0x98]
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0xa0]
movsd qword [esp], xmm0
call fcn.0042b080
add esp, 0x10
test al, al
je 0x478b30
lea ecx, [esp + 0x48]
mov eax, esp
push eax
push 0xffffffffffffffff
push 4
push eax
call fcn.004242a0
test edi, edi
je 0x478c89
test byte [edi], 1
je 0x478b01
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x478b01
push dword [edi + 8]
call fcn.00420e70
add esp, 4
mov eax, dword [esp + 0x50]
mov dword [edi + 8], eax
movsd xmm0, qword [esp + 0x48]
movsd qword [edi], xmm0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], 0
jmp 0x478c9e
movzx eax, byte [esp]
test al, 1
je 0x478b5c
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x478b62
lea eax, [esp + 0x30]
push eax
call fcn.0042c280
test byte [esp + 0x30], 1
jne 0x478a04
jmp 0x478a10
shr eax, 1
lea ecx, [esp + 1]
mov dword [esp + 0x84], eax
mov dword [esp + 0x80], ecx
mov dword [esp + 0x78], str.FAIL
mov dword [esp + 0x7c], 4
sub esp, 0x10
movsd xmm0, qword [esp + 0x88]
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x90]
movsd qword [esp], xmm0
call fcn.0042b080
add esp, 0x10
test al, al
je 0x478c77
lea eax, [esp + 0xaf]
push eax
push str.remote:__s
lea eax, [esp + 0x14]
push eax
call fcn.004a31b0
add esp, 0xc
mov eax, dword [esp + 0x1c]
test byte [eax], 1
je 0x478bf1
mov eax, dword [ebp + 0x10]
mov byte [eax], 0
mov dword [ebp + 0xc], 0
test byte [ebp + 8], 1
je 0x478bf1
push dword [ebp + 0x10]
call fcn.00420e70
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 8], eax
movsd xmm0, qword [esp + 0xc]
movsd qword [ecx], xmm0
lea ecx, [esp + 0x3c]
mov eax, esp
push eax
push 0xffffffffffffffff
push 4
push eax
call fcn.004242a0
test edi, edi
je 0x478d65
test byte [edi], 1
je 0x478c41
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x478c41
push dword [edi + 8]
call fcn.00420e70
add esp, 4
mov eax, dword [esp + 0x44]
mov dword [edi + 8], eax
movsd xmm0, qword [esp + 0x3c]
movsd qword [edi], xmm0
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x18], 4
jmp 0x478efe
movzx eax, byte [esp]
test al, 1
je 0x478cb7
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x478cbd
xor ebx, ebx
test byte [esp + 0x48], 1
je 0x478ca0
push dword [esp + 0x50]
call fcn.00420e70
add esp, 4
xor ebx, ebx
mov dword [esp + 0x18], 0
test byte [esp], 1
je 0x4787fc
jmp 0x4787f0
shr eax, 1
lea ecx, [esp + 1]
mov dword [esp + 0x74], eax
mov dword [esp + 0x70], ecx
mov dword [esp + 0x68], str.TEXT
mov dword [esp + 0x6c], 4
sub esp, 0x10
movsd xmm0, qword [esp + 0x78]
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x80]
movsd qword [esp], xmm0
call fcn.0042b080
add esp, 0x10
test al, al
je 0x478d53
lea ebx, [esp + 0xc]
mov ecx, ebx
mov eax, esp
push eax
push 0xffffffffffffffff
push 4
push eax
call fcn.004242a0
mov ecx, dword [ebp + 0x70]
test ecx, ecx
je 0x47901c
mov eax, dword [ecx]
push ebx
call dword [eax + 0x18]
test byte [esp + 0xc], 1
je 0x478d35
push dword [esp + 0x14]
call fcn.00420e70
add esp, 4
mov bl, 1
call fcn.004a72a0
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
test byte [esp], 1
je 0x4787fc
jmp 0x4787f0
movzx eax, byte [esp]
test al, 1
je 0x478d89
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x478d8f
mov dword [esp + 0x18], 4
test byte [esp + 0x3c], 1
je 0x478efe
push dword [esp + 0x44]
call fcn.00420e70
add esp, 4
jmp 0x478efe
shr eax, 1
lea ecx, [esp + 1]
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], ecx
mov dword [esp + 0x58], str.DATA
mov dword [esp + 0x5c], 4
sub esp, 0x10
movsd xmm0, qword [esp + 0x68]
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x70]
movsd qword [esp], xmm0
call fcn.0042b080
add esp, 0x10
test al, al
je 0x478ea7
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], 0
lea ecx, [esp + 0xc]
mov eax, esp
push eax
push 0xffffffffffffffff
push 4
push eax
call fcn.004242a0
test byte [esp + 0xc], 1
lea eax, [esp + 0xd]
je 0x478e09
mov eax, dword [esp + 0x14]
push 0x10
push 0
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
add esp, 0xc
mov ecx, dword [esp + 0x1c8]
test ecx, ecx
je 0x478e23
mov dword [ecx], eax
movzx ebx, byte [esp + 0xc]
lea ecx, [esp + 0xd]
mov eax, dword [ecx]
mov ecx, dword [ecx + 3]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2b], ecx
mov esi, dword [esp + 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
test edi, edi
je 0x478f0f
test byte [edi], 1
je 0x478e7f
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x478e7f
push dword [edi + 8]
call fcn.00420e70
add esp, 4
mov byte [edi], bl
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2b]
mov edx, dword [esp + 0x54]
mov dword [edx + 3], ecx
mov dword [edx], eax
mov dword [edi + 8], esi
mov dword [esp + 0x2b], 0
mov dword [esp + 0x28], 0
jmp 0x478f1d
push esi
push str.Device_sent_unknown_status_code:__s
lea eax, [esp + 0x14]
push eax
call fcn.004a31b0
add esp, 0xc
mov eax, dword [esp + 0x1c]
test byte [eax], 1
je 0x478ee1
mov eax, dword [ebp + 0x10]
mov byte [eax], 0
mov dword [ebp + 0xc], 0
test byte [ebp + 8], 1
je 0x478ee1
push dword [ebp + 0x10]
call fcn.00420e70
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 8], eax
movsd xmm0, qword [esp + 0xc]
movsd qword [ecx], xmm0
mov dword [esp + 0x18], 3
xor ebx, ebx
test byte [esp], 1
je 0x4787fc
jmp 0x4787f0
test bl, 1
je 0x478f1d
push esi
call fcn.00420e70
add esp, 4
test byte [esp + 0xc], 1
je 0x478f30
push dword [esp + 0x14]
call fcn.00420e70
add esp, 4
xor ebx, ebx
mov dword [esp + 0x18], 0
lea esi, [esp + 0xab]
test byte [esp], 1
je 0x4787fc
jmp 0x4787f0
mov dword [esp + 0x18], 5
jmp 0x479004
push 0x20
call fcn.00420cd0
add esp, 4
mov edi, eax
movups xmm0, xmmword [str.Status_read_failed]
movups xmmword [eax], xmm0
mov word [eax + 0x10], 0x6465
mov byte [eax + 0x12], 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_strerror
add esp, 4
push eax
push edi
push str._s___s_
lea eax, [esp + 0xc]
push eax
call fcn.004a31b0
add esp, 0x10
mov eax, dword [esp + 0x1c]
test byte [eax], 1
je 0x478fc8
mov eax, dword [ebp + 0x10]
mov byte [eax], 0
mov dword [ebp + 0xc], 0
test byte [ebp + 8], 1
je 0x478fc8
push dword [ebp + 0x10]
call fcn.00420e70
add esp, 4
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 8], eax
movsd xmm0, qword [esp]
movsd qword [ecx], xmm0
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], 0
push edi
call fcn.00420e70
add esp, 4
mov dword [esp + 0x18], 2
mov eax, dword [esp + 0x18]
add esp, 0x1ac
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
mov ecx, esp
call fcn.00423df0
call fcn.00413480
nop word cs:[eax + eax]