Function at 0x10004f71
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x10006ba0
call fcn.10006900
sub esp, 0x5b0
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0x101
xor eax, eax
lea edi, [ebp - 0x5b8]
mov dword [ebp - 0x5bc], ebx
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], ebx
call fcn.10004d5a
push ebx
push 0x80
push 4
push ebx
push ebx
push connect
push dword [ebp + 8]
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push ebx
push 0xffffffffffffffeb
push eax
mov dword [ebp - 0x18], eax
call esi
lea eax, [ebp - 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
push eax
lea eax, [ebp - 0x34]
push 0x15
push eax
push dword [ebp - 0x18]
call edi
push 2
push ebx
push 0xffffff3f
push dword [ebp - 0x18]
call esi
lea eax, [ebp - 0x1c]
push ebx
push eax
mov esi, 0xac
lea eax, [ebp - 0x164]
push esi
push eax
push dword [ebp - 0x18]
call edi
push 0x14
lea eax, [ebp - 0x34]
pop edi
lea ecx, [ebp - 0x10]
push edi
push eax
lea eax, [ebp - 0x5bc]
push eax
call fcn.10004d5e
lea eax, [ebp - 0x164]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x164]
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004dc1
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004d5e
movzx eax, byte [ebp - 0xc4]
push eax
lea eax, [ebp - 0x144]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x5bc]
push eax
call fcn.10004dc1
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004d5e
movzx eax, byte [ebp - 0xc3]
push eax
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004dc1
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004d5e
movzx eax, byte [ebp - 0xc2]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004dc1
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004d5e
movzx eax, byte [ebp - 0xc1]
push eax
lea eax, [ebp - 0xe4]
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004dc1
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0x164]
push eax
push esi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
xor eax, eax
lea edi, [ebp - 0xb7]
mov byte [ebp - 0xb8], bl
push 0x20
mov byte [ebp - 0x1b4], bl
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x13
xor eax, eax
pop ecx
lea edi, [ebp - 0x1b3]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x10]
mov ecx, 0xffffff3f
push 2
push ebx
lea eax, [eax + eax*4]
shl eax, 4
sub ecx, eax
push ecx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esi + 0xa4], ebx
mov dword [ebp + 0x10], ebx
jle 0x100051c5
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x40]
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x1b4]
push 0x50
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x1b4]
push 0x50
push eax
lea eax, [edi - 0x40]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
inc dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
mov dword [edi + 4], ebx
mov dword [edi], ebx
mov dword [edi + 8], ebx
mov dword [edi - 4], ebx
add edi, 0x50
cmp eax, dword [esi + 0xa4]
jl 0x1000517d
xor ecx, ecx
cmp dword [esi + 0xa4], ebx
mov dword [ebp + 0x10], ebx
jle 0x1000523c
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x28]
mov eax, dword [edi]
add ecx, dword [edi + 0x10]
imul eax, eax, 0x84
push eax
mov dword [ebp + 8], ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [edi + 0x14], eax
mov eax, dword [edi + 8]
imul eax, eax, 0x84
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [edi + 0x1c], eax
mov eax, dword [edi + 4]
imul eax, eax, 0x84
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0xc]
imul eax, eax, 0x84
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 8]
add esp, 0x10
inc dword [ebp + 0x10]
mov dword [edi + 0x20], eax
mov eax, dword [ebp + 0x10]
add edi, 0x50
cmp eax, dword [esi + 0xa4]
jl 0x100051d8
mov eax, dword [esi + 0xa4]
imul ecx, ecx, 0x84
imul eax, eax, 0xffffffb0
sub eax, ecx
push 2
sub eax, 0xc1
push ebx
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esi + 0xa4], ebx
mov dword [ebp + 0x10], ebx
jle 0x10005499
mov eax, dword [ebp + 0xc]
mov esi, 0x84
lea edi, [eax + 0x28]
cmp dword [edi], ebx
mov dword [ebp + 8], ebx
jle 0x100052f9
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0xb8]
push esi
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x34]
push 0x14
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004d5e
push dword [ebp - 0x38]
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x5bc]
push eax
call fcn.10004dc1
lea eax, [ebp - 0xb8]
push esi
push eax
mov eax, dword [ebp - 0x14]
add eax, dword [edi + 0x14]
push eax
call sub.MSVCRT.dll_memcpy
push esi
lea eax, [ebp - 0xb8]
push ebx
push eax
call sub.MSVCRT.dll_memset
add dword [ebp - 0x14], esi
add esp, 0x18
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [edi]
jl 0x10005283
cmp dword [edi + 8], ebx
mov dword [ebp + 8], ebx
jle 0x1000537b
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0xb8]
push esi
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x34]
push 0x14
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004d5e
push dword [ebp - 0x38]
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x5bc]
push eax
call fcn.10004dc1
lea eax, [ebp - 0xb8]
push esi
push eax
mov eax, dword [ebp - 0x14]
add eax, dword [edi + 0x1c]
push eax
call sub.MSVCRT.dll_memcpy
push esi
lea eax, [ebp - 0xb8]
push ebx
push eax
call sub.MSVCRT.dll_memset
add dword [ebp - 0x14], esi
add esp, 0x18
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 8]
jl 0x10005304
cmp dword [edi + 4], ebx
mov dword [ebp + 8], ebx
jle 0x100053fd
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0xb8]
push esi
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x34]
push 0x14
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004d5e
push dword [ebp - 0x38]
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x5bc]
push eax
call fcn.10004dc1
lea eax, [ebp - 0xb8]
push esi
push eax
mov eax, dword [ebp - 0x14]
add eax, dword [edi + 0x18]
push eax
call sub.MSVCRT.dll_memcpy
push esi
lea eax, [ebp - 0xb8]
push ebx
push eax
call sub.MSVCRT.dll_memset
add dword [ebp - 0x14], esi
add esp, 0x18
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 4]
jl 0x10005386
cmp dword [edi + 0xc], ebx
mov dword [ebp + 8], ebx
jle 0x1000547f
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0xb8]
push esi
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x34]
push 0x14
push eax
lea eax, [ebp - 0x5bc]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004d5e
push dword [ebp - 0x38]
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x5bc]
push eax
call fcn.10004dc1
lea eax, [ebp - 0xb8]
push esi
push eax
mov eax, dword [ebp - 0x14]
add eax, dword [edi + 0x20]
push eax
call sub.MSVCRT.dll_memcpy
push esi
lea eax, [ebp - 0xb8]
push ebx
push eax
call sub.MSVCRT.dll_memset
add dword [ebp - 0x14], esi
add esp, 0x18
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 0xc]
jl 0x10005408
inc dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
add edi, 0x50
cmp ecx, dword [eax + 0xa4]
jl 0x10005279
mov esi, eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
cmp dword [esi + 0xa4], ebx
jle 0x100054c8
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
call fcn.10004e1c
add dword [ebp + 0xc], 0x50
inc edi
cmp edi, dword [esi + 0xa4]
pop ecx
jl 0x100054b2
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
mov dword [0x100923bc], ebx
call fcn.10004d5d
mov ecx, dword [ebp - 0xc]
push 1
pop eax
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret