Function at 0x477e60
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.004a7580
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
test edi, edi
je 0x477ed1
test byte [edi], 1
je 0x477ebd
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x477ebd
push dword [edi + 8]
call fcn.004203b0
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 0x477f04
push dword [esp + 8]
call fcn.004203b0
add esp, 4
test bl, bl
je 0x478704
call fcn.004a7580
sub eax, dword [esp + 0x24]
sbb edx, dword [esp + 0x20]
mov ecx, 0xfc23abff
cmp ecx, eax
mov eax, 6
sbb eax, edx
jl 0x478650
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
push 0x100
push esi
call dword [eax + 8]
test eax, eax
js 0x47865d
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 0x478715
mov ebx, eax
cmp eax, 0xb
jae 0x477f90
mov eax, ebx
add al, bl
mov byte [esp], al
lea esi, [esp + 1]
test ebx, ebx
jne 0x477fbc
jmp 0x477fce
mov edi, ebp
mov ebp, ebx
or ebp, 0xf
lea eax, [ebp + 1]
push eax
call fcn.00420210
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 0x477ff0
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x477ff6
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.0042a580
add esp, 0x10
test al, al
je 0x478150
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.004237d0
mov ecx, dword [ebp + 0x58]
test ecx, ecx
je 0x47871c
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 0x4780fd
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 8]
jae 0x478242
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 0x478110
push dword [esp + 0x38]
call fcn.004203b0
add esp, 4
call fcn.004a7580
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
test byte [esp + 0xc], 1
je 0x478130
push dword [esp + 0x14]
call fcn.004203b0
add esp, 4
mov bl, 1
test byte [esp], 1
je 0x477efc
jmp 0x477ef0
movzx eax, byte [esp]
test al, 1
je 0x478170
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x478176
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.0042a580
add esp, 0x10
test al, al
je 0x478230
lea ecx, [esp + 0x48]
mov eax, esp
push eax
push 0xffffffffffffffff
push 4
push eax
call fcn.004237d0
test edi, edi
je 0x478389
test byte [edi], 1
je 0x478201
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x478201
push dword [edi + 8]
call fcn.004203b0
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 0x47839e
movzx eax, byte [esp]
test al, 1
je 0x47825c
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x478262
lea eax, [esp + 0x30]
push eax
call fcn.0042b770
test byte [esp + 0x30], 1
jne 0x478104
jmp 0x478110
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.0042a580
add esp, 0x10
test al, al
je 0x478377
lea eax, [esp + 0xaf]
push eax
push str.remote:__s
lea eax, [esp + 0x14]
push eax
call fcn.004a34d0
add esp, 0xc
mov eax, dword [esp + 0x1c]
test byte [eax], 1
je 0x4782f1
mov eax, dword [ebp + 0x10]
mov byte [eax], 0
mov dword [ebp + 0xc], 0
test byte [ebp + 8], 1
je 0x4782f1
push dword [ebp + 0x10]
call fcn.004203b0
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.004237d0
test edi, edi
je 0x478465
test byte [edi], 1
je 0x478341
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x478341
push dword [edi + 8]
call fcn.004203b0
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 0x4785fe
movzx eax, byte [esp]
test al, 1
je 0x4783b7
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x4783bd
xor ebx, ebx
test byte [esp + 0x48], 1
je 0x4783a0
push dword [esp + 0x50]
call fcn.004203b0
add esp, 4
xor ebx, ebx
mov dword [esp + 0x18], 0
test byte [esp], 1
je 0x477efc
jmp 0x477ef0
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.0042a580
add esp, 0x10
test al, al
je 0x478453
lea ebx, [esp + 0xc]
mov ecx, ebx
mov eax, esp
push eax
push 0xffffffffffffffff
push 4
push eax
call fcn.004237d0
mov ecx, dword [ebp + 0x70]
test ecx, ecx
je 0x47871c
mov eax, dword [ecx]
push ebx
call dword [eax + 0x18]
test byte [esp + 0xc], 1
je 0x478435
push dword [esp + 0x14]
call fcn.004203b0
add esp, 4
mov bl, 1
call fcn.004a7580
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
test byte [esp], 1
je 0x477efc
jmp 0x477ef0
movzx eax, byte [esp]
test al, 1
je 0x478489
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
jmp 0x47848f
mov dword [esp + 0x18], 4
test byte [esp + 0x3c], 1
je 0x4785fe
push dword [esp + 0x44]
call fcn.004203b0
add esp, 4
jmp 0x4785fe
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.0042a580
add esp, 0x10
test al, al
je 0x4785a7
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.004237d0
test byte [esp + 0xc], 1
lea eax, [esp + 0xd]
je 0x478509
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 0x478523
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 0x47860f
test byte [edi], 1
je 0x47857f
mov eax, dword [edi + 8]
mov byte [eax], 0
mov dword [edi + 4], 0
test byte [edi], 1
je 0x47857f
push dword [edi + 8]
call fcn.004203b0
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 0x47861d
push esi
push str.Device_sent_unknown_status_code:__s
lea eax, [esp + 0x14]
push eax
call fcn.004a34d0
add esp, 0xc
mov eax, dword [esp + 0x1c]
test byte [eax], 1
je 0x4785e1
mov eax, dword [ebp + 0x10]
mov byte [eax], 0
mov dword [ebp + 0xc], 0
test byte [ebp + 8], 1
je 0x4785e1
push dword [ebp + 0x10]
call fcn.004203b0
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 0x477efc
jmp 0x477ef0
test bl, 1
je 0x47861d
push esi
call fcn.004203b0
add esp, 4
test byte [esp + 0xc], 1
je 0x478630
push dword [esp + 0x14]
call fcn.004203b0
add esp, 4
xor ebx, ebx
mov dword [esp + 0x18], 0
lea esi, [esp + 0xab]
test byte [esp], 1
je 0x477efc
jmp 0x477ef0
mov dword [esp + 0x18], 5
jmp 0x478704
push 0x20
call fcn.00420210
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.004a34d0
add esp, 0x10
mov eax, dword [esp + 0x1c]
test byte [eax], 1
je 0x4786c8
mov eax, dword [ebp + 0x10]
mov byte [eax], 0
mov dword [ebp + 0xc], 0
test byte [ebp + 8], 1
je 0x4786c8
push dword [ebp + 0x10]
call fcn.004203b0
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.004203b0
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.00423320
call fcn.004138e0
nop word cs:[eax + eax]