Function at 0x4e8170
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov esi, esp
mov dword [esi + 0x78], ebp
mov dword [esi + 0x7c], esp
mov dword [esi + 0x88], 0xffffffff
mov dword [esi + 0x84], 0x4f7600
mov edx, dword [ebp + 0xc]
lea eax, [esi + 0x80]
mov ecx, dword fs:[0]
mov dword [esi + 0x80], ecx
mov dword fs:[0], eax
mov eax, dword [edx + 8]
cmp dword [edx + 4], 0
mov dword [edx + 4], 0
je 0x4e81ce
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x5f5b98]
mov ecx, dword [edx + 0xc]
mov ebx, dword [edx + 0x10]
mov dword [edx + 0xc], 0
mov dword [esi + 0xc], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x20], 0
mov edi, dword [edx + 0x18]
mov eax, dword [edx + 0x14]
mov dword [edx + 0x14], 0
cmp ecx, 1
mov dword [esi], edi
jne 0x4e845a
test eax, eax
je 0x4e8684
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
je 0x4e8bca
mov edi, eax
push 4
push 0x14
call fcn.0043c290
add esp, 8
test eax, eax
je 0x4e8bbc
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 0x10], edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x58], ebx
mov dword [esi + 0x60], eax
lea eax, [esi + 0xc]
mov dword [esi + 0x64], eax
mov dword [esi + 0x68], 0
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
je 0x4e889a
mov ebx, eax
push 4
push 0x14
call fcn.0043c290
add esp, 8
test eax, eax
je 0x4e8bbc
mov ecx, dword [esi]
mov dword [esi + 0x70], edi
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 0x10], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x74], ebx
mov dword [esi + 0x30], ecx
lea ecx, [esi + 0x18]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x40], 0
nop dword [eax]
push 0xffffffffffffffff
push 0
lea eax, [esi + 0x70]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
je 0x4e8350
test eax, eax
jne 0x4e88e6
mov eax, dword [esi + 0x68]
test eax, eax
je 0x4e83f6
cmp eax, 1
jne 0x4e83d4
mov eax, dword [esi + 0x58]
mov ecx, dword [esi + 0x60]
mov dword [esi + 0x24], 0
push 1
lea edx, [esi + 0x24]
push edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4e8443
mov edi, dword [esi + 0x24]
jmp 0x4e83d7
mov eax, dword [esi + 0x40]
test eax, eax
je 0x4e83a6
cmp eax, 1
jne 0x4e8384
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x38]
mov dword [esi + 0x24], 0
push 1
lea edx, [esi + 0x24]
push edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4e8424
mov edi, dword [esi + 0x24]
jmp 0x4e8387
mov edi, dword [esi + 0x44]
mov dword [esi + 0x40], 0
mov eax, dword [esi + 0x3c]
add dword [eax + 8], edi
test edi, edi
mov dword [esi + 0x88], 5
je 0x4e88cd
lea ecx, [esi + 0x24]
lea edx, [esi + 0x30]
mov dword [esi + 0x88], 5
call fcn.004f0450
cmp byte [esi + 0x24], 1
je 0x4e88c0
cmp byte [esi + 0x25], 1
je 0x4e82f0
jmp 0x4e88cd
mov edi, dword [esi + 0x6c]
mov dword [esi + 0x68], 0
mov eax, dword [esi + 0x64]
add dword [eax + 8], edi
test edi, edi
mov dword [esi + 0x88], 5
je 0x4e88d7
lea ecx, [esi + 0x24]
lea edx, [esi + 0x58]
mov dword [esi + 0x88], 5
call fcn.004f0450
cmp byte [esi + 0x24], 1
je 0x4e88c0
cmp byte [esi + 0x25], 1
je 0x4e82f0
jmp 0x4e88d7
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x4e8387
cmp eax, 0x6d
je 0x4e8387
jmp 0x4e88ec
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x4e83d7
cmp eax, 0x6d
je 0x4e83d7
jmp 0x4e88ec
test eax, eax
je 0x4e8985
lea eax, [esi + 0x18]
xor edi, edi
mov dword [esi + 0x58], eax
xor eax, eax
mov dword [esi + 0x5c], 0
jmp 0x4e8483
mov eax, dword [esi + 0x1c]
cmp edi, eax
mov dword [esi + 4], edi
jne 0x4e84b5
mov edx, dword [esi + 0x20]
mov eax, edi
sub eax, edx
cmp eax, 0x1f
mov eax, edi
ja 0x4e84b5
mov dword [esi + 0x88], 0xb
lea ecx, [esi + 0x18]
push 0x20
call fcn.0056fa70
add esp, 4
mov eax, dword [esi + 0x1c]
mov edi, dword [esi + 4]
mov ecx, dword [esi + 0x20]
cmp ecx, eax
jae 0x4e84c9
cmp eax, edi
mov dword [esi + 0x20], eax
jb 0x4e8b22
mov ecx, eax
mov ebx, ecx
sub ebx, edi
jb 0x4e8ac3
mov eax, dword [esi + 0x18]
mov dword [esi + 0x30], 0
add eax, edi
push 0
lea ecx, [esi + 0x30]
push ecx
push ebx
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4e8510
mov eax, dword [esi + 0x30]
mov ecx, eax
mov edx, eax
and ecx, 0xffffff00
and edx, 0xffff0000
jmp 0x4e8538
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push eax
call fcn.004f50d0
add esp, 4
xor edx, edx
mov byte [esi + 8], al
cmp al, 0xb
mov ecx, 0
mov eax, 0
jne 0x4e8657
and ecx, 0xff00
movzx eax, al
or ecx, edx
or eax, ecx
je 0x4e8677
mov edi, dword [esi + 4]
cmp eax, ebx
ja 0x4e8ae1
mov ecx, dword [esi + 0x1c]
add edi, eax
mov dword [esi + 0x5c], edi
or ecx, edi
jne 0x4e8480
xorps xmm0, xmm0
mov dword [esi + 4], edi
movaps xmmword [esi + 0x40], xmm0
movaps xmmword [esi + 0x30], xmm0
nop word cs:[eax + eax]
nop
mov dword [esi + 0x24], 0
push 0
lea eax, [esi + 0x24]
push eax
push 0x20
lea eax, [esi + 0x30]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4e85d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push eax
call fcn.004f50d0
add esp, 4
cmp al, 0xb
je 0x4e866c
cmp al, 0x23
je 0x4e8580
jmp 0x4e8a4c
mov eax, dword [esi + 0x24]
mov ecx, eax
mov edx, eax
and ecx, 0xffffff00
and edx, 0xffff0000
movzx ebx, al
mov eax, dword [esi + 4]
and ecx, 0xff00
or ebx, ecx
or ebx, edx
je 0x4e867a
cmp ebx, 0x21
jae 0x4e8b81
mov eax, dword [esi + 0x1c]
mov edi, dword [esi + 0x20]
sub eax, edi
cmp eax, ebx
jae 0x4e862f
mov dword [esi + 0x88], 0xb
lea ecx, [esi + 0x18]
mov edx, edi
mov dword [esi + 8], ebx
push ebx
call fcn.0056fa70
add esp, 4
mov edi, dword [esi + 0x20]
mov ebx, dword [esi + 8]
mov eax, dword [esi + 0x18]
add eax, edi
push ebx
lea ecx, [esi + 0x30]
push ecx
push eax
call fcn.0054ad50
add esp, 0xc
add edi, ebx
mov dword [esi + 0x20], edi
mov edi, dword [esi + 4]
mov eax, dword [esi + 0x1c]
add edi, ebx
mov dword [esi + 0x5c], edi
jmp 0x4e8483
cmp byte [esi + 8], 0x23
jne 0x4e8a4c
mov edi, dword [esi + 4]
mov eax, dword [esi + 0x1c]
jmp 0x4e8483
xor eax, eax
xor ecx, ecx
xor edx, edx
jmp 0x4e85e3
mov eax, dword [esi + 4]
mov ebx, dword [esi]
mov dword [esi + 0x20], eax
jmp 0x4e888e
lea eax, [esi + 0xc]
xor edi, edi
mov dword [esi + 4], ebx
mov dword [esi + 0x58], eax
xor eax, eax
mov dword [esi + 0x5c], 0
jmp 0x4e86a3
mov eax, dword [esi + 0x10]
cmp edi, eax
mov dword [esi], edi
jne 0x4e86d3
mov edx, dword [esi + 0x14]
mov eax, edi
sub eax, edx
cmp eax, 0x1f
mov eax, edi
ja 0x4e86d3
mov dword [esi + 0x88], 8
lea ecx, [esi + 0xc]
push 0x20
call fcn.0056fa70
add esp, 4
mov eax, dword [esi + 0x10]
mov edi, dword [esi]
mov ecx, dword [esi + 0x14]
cmp ecx, eax
jae 0x4e86e7
cmp eax, edi
mov dword [esi + 0x14], eax
jb 0x4e8b63
mov ecx, eax
mov ebx, ecx
sub ebx, edi
jb 0x4e8b04
mov eax, dword [esi + 0xc]
mov dword [esi + 0x30], 0
add eax, edi
push 0
lea ecx, [esi + 0x30]
push ecx
push ebx
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4e8730
mov eax, dword [esi + 0x30]
mov ecx, eax
mov edx, eax
and ecx, 0xffffff00
and edx, 0xffff0000
jmp 0x4e8758
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push eax
call fcn.004f50d0
add esp, 4
xor edx, edx
mov byte [esi + 8], al
cmp al, 0xb
mov ecx, 0
mov eax, 0
jne 0x4e8867
and ecx, 0xff00
movzx eax, al
or ecx, edx
or eax, ecx
je 0x4e8886
mov edi, dword [esi]
cmp eax, ebx
ja 0x4e8b40
mov ecx, dword [esi + 0x10]
mov ebx, dword [esi + 4]
add edi, eax
mov dword [esi + 0x5c], edi
or ecx, edi
jne 0x4e86a0
xorps xmm0, xmm0
mov dword [esi], edi
movaps xmmword [esi + 0x40], xmm0
movaps xmmword [esi + 0x30], xmm0
nop word cs:[eax + eax]
nop
mov dword [esi + 0x24], 0
push 0
lea eax, [esi + 0x24]
push eax
push 0x20
lea eax, [esi + 0x30]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4e87e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push eax
call fcn.004f50d0
add esp, 4
cmp al, 0xb
je 0x4e887b
cmp al, 0x23
je 0x4e87a0
jmp 0x4e8a88
mov eax, dword [esi + 0x24]
mov ecx, eax
mov edx, eax
and ecx, 0xffffff00
and edx, 0xffff0000
movzx edi, al
mov eax, dword [esi]
and ecx, 0xff00
or edi, ecx
or edi, edx
je 0x4e888b
cmp edi, 0x21
mov ebx, edi
jae 0x4e8ba0
mov eax, dword [esi + 0x10]
mov edi, dword [esi + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x4e8840
mov dword [esi + 0x88], 8
lea ecx, [esi + 0xc]
mov edx, edi
mov dword [esi + 8], ebx
push ebx
call fcn.0056fa70
add esp, 4
mov edi, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov eax, dword [esi + 0xc]
add eax, edi
push ebx
lea ecx, [esi + 0x30]
push ecx
push eax
call fcn.0054ad50
add esp, 0xc
add edi, ebx
mov dword [esi + 0x14], edi
mov edi, dword [esi]
mov eax, dword [esi + 0x10]
add edi, ebx
mov dword [esi + 0x5c], edi
jmp 0x4e86a3
cmp byte [esi + 8], 0x23
jne 0x4e8a88
mov edi, dword [esi]
mov eax, dword [esi + 0x10]
jmp 0x4e86a3
xor eax, eax
xor ecx, ecx
xor edx, edx
jmp 0x4e87f3
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov dword [esi + 0x14], eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4e8985
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
shl edi, 0x18
mov dword [esi], 0
shr eax, 8
mov dword [esi + 8], edi
jmp 0x4e8943
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x2c]
mov dword [esi], eax
mov dword [esi + 4], ecx
jmp 0x4e88ff
lea ecx, [esi + 0x58]
call fcn.004f0540
jmp 0x4e88df
lea ecx, [esi + 0x30]
call fcn.004f0540
mov dword [esi], eax
mov dword [esi + 4], edx
jmp 0x4e88ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 4], eax
mov dword [esi], 0
mov dword [esi + 0x88], 4
lea eax, [esi + 0x30]
mov dword [esi + 0x88], 4
push eax
call fcn.004f0610
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x30]
call edi
push dword [esi + 0x34]
call edi
push 4
push 0x14
push dword [esi + 0x38]
call fcn.0043c2a0
add esp, 0xc
mov ecx, dword [esi]
mov eax, dword [esi + 4]
shrd ecx, eax, 8
shr eax, 8
mov dword [esi + 8], ecx
mov dword [esi + 4], eax
lea eax, [esi + 0x58]
mov dword [esi + 0x88], 2
push eax
call fcn.004f0610
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x58]
call edi
push dword [esi + 0x5c]
call edi
push 4
push 0x14
push dword [esi + 0x60]
call fcn.0043c2a0
add esp, 0xc
mov eax, dword [esi]
cmp al, 4
jne 0x4e8bf0
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [eax + 4], 0
mov ebx, dword [eax]
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4e89ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 8], eax
mov eax, dword [esi + 0x1c]
mov dword [edi + 4], 0
mov dword [edi], 1
test eax, eax
je 0x4e89d1
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x4e89d1
push 1
push eax
push ecx
call fcn.0043c2a0
add esp, 0xc
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4e8a2f
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x4e8a2f
push 1
push eax
push ecx
call fcn.0043c2a0
add esp, 0xc
jmp 0x4e8a2f
lea eax, [esi + 0x30]
mov dword [esi + 0x30], 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x4e89a1
movsd xmm0, qword [esi + 0xc]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x30]
mov edx, dword [esi + 0x20]
movsd qword [edi + 8], xmm0
movsd xmm0, qword [esi + 0x18]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x1c], edx
movsd qword [edi + 0x14], xmm0
mov dword [edi + 4], eax
mov dword [edi], 0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x80]
mov dword fs:[0], eax
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esi + 4]
mov dword [esi + 0x88], 0xa
mov dword [esi + 0x34], edi
mov dword [esi + 0x30], 0
mov dword [esi + 0x20], eax
push 0x5f6860
push 0x5f5670
lea eax, [esi + 0x30]
push eax
push 0x2b
push 0x5f5634
call fcn.005708f0
add esp, 0x14
jmp 0x4e8c2d
mov eax, dword [esi]
mov dword [esi + 0x88], 7
mov dword [esi + 0x34], edi
mov dword [esi + 0x30], 0
mov dword [esi + 0x14], eax
push 0x5f6850
push 0x5f5670
lea eax, [esi + 0x30]
push eax
push 0x2b
push 0x5f5634
call fcn.005708f0
add esp, 0x14
jmp 0x4e8c2d
mov dword [esi + 0x88], 0xb
push 0x5f6538
push ecx
push edi
call fcn.00570970
add esp, 0xc
jmp 0x4e8c2d
mov dword [esi + 0x88], 0xb
push 0x5f6568
push 0x20
push str.assertion_failed:_n___buf.len__
call fcn.005707b0
add esp, 0xc
jmp 0x4e8c2d
mov dword [esi + 0x88], 8
push 0x5f6538
push ecx
push edi
call fcn.00570970
add esp, 0xc
jmp 0x4e8c2d
mov dword [esi + 0x88], 0xb
push 0x5f6528
push eax
push edi
call fcn.00570970
add esp, 0xc
jmp 0x4e8c2d
mov dword [esi + 0x88], 8
push 0x5f6568
push 0x20
push str.assertion_failed:_n___buf.len__
call fcn.005707b0
add esp, 0xc
jmp 0x4e8c2d
mov dword [esi + 0x88], 8
push 0x5f6528
push eax
push edi
call fcn.00570970
add esp, 0xc
jmp 0x4e8c2d
mov dword [esi + 0x88], 0xb
push 0x5f6578
push 0x20
push ebx
call fcn.005709d0
add esp, 0xc
jmp 0x4e8c2d
mov dword [esi + 0x88], 8
push 0x5f6578
push 0x20
push ebx
call fcn.005709d0
add esp, 0xc
jmp 0x4e8c2d
push 4
push 0x14
call fcn.00570650
add esp, 8
ud2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov ebx, eax
call eax
push dword [esi]
call ebx
mov eax, edi
shl edi, 0x18
shr eax, 8
mov dword [esi + 8], edi
mov dword [esi + 4], eax
xor eax, eax
mov byte [esi + 0x30], al
mov eax, dword [esi + 8]
mov dword [esi + 0x88], 1
mov dword [esi + 0x31], eax
mov eax, dword [esi + 4]
mov word [esi + 0x35], ax
shr eax, 0x10
mov byte [esi + 0x37], al
lea eax, [esi + 0x30]
push 0x5f6840
push 0x5f5670
push eax
push 0x2b
push 0x5f5634
call fcn.005708f0
add esp, 0x14
ud2