Function at 0x10004606
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x10005ff0
call fcn.10005d40
sub esp, 0x5f4
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0x101
xor eax, eax
lea edi, [ebp - 0x5fc]
mov dword [ebp - 0x600], ebx
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], ebx
call fcn.1000266b
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 0xfffffefb
push dword [ebp - 0x18]
call esi
lea eax, [ebp - 0x1c]
push ebx
push eax
mov esi, pe_nt_image_headers32
lea eax, [ebp - 0x1a8]
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 - 0x600]
push eax
call fcn.100043f3
lea eax, [ebp - 0x1a8]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x1a8]
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004456
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
movzx eax, byte [ebp - 0x108]
push eax
lea eax, [ebp - 0x188]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x600]
push eax
call fcn.10004456
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
movzx eax, byte [ebp - 0x107]
push eax
lea eax, [ebp - 0x168]
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004456
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
movzx eax, byte [ebp - 0x106]
push eax
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004456
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
movzx eax, byte [ebp - 0x105]
push eax
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004456
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
movzx eax, byte [ebp - 0xbc]
push eax
lea eax, [ebp - 0xfc]
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004456
lea eax, [ebp - 0x34]
push edi
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
movzx eax, byte [ebp - 0xbb]
push eax
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.10004456
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0x1a8]
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 - 0x1f8], 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 - 0x1f7]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x10]
mov ecx, 0xfffffefb
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 0x100048be
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x40]
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x1f8]
push 0x50
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x1f8]
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 0x10004876
xor eax, eax
cmp dword [esi + 0xa4], ebx
mov dword [ebp + 0x10], ebx
jle 0x10004935
mov ecx, dword [ebp + 0xc]
lea edi, [ecx + 0x28]
add eax, dword [edi + 0x10]
mov dword [ebp + 8], eax
mov eax, dword [edi]
imul eax, eax, 0x84
push eax
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_
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]
mov eax, dword [ebp + 8]
jl 0x100048d1
mov ecx, dword [esi + 0xa4]
imul eax, eax, 0xffffff7c
lea ecx, [ecx + ecx*4]
push 2
shl ecx, 4
sub eax, ecx
push ebx
sub eax, 0x105
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esi + 0xa4], ebx
mov dword [ebp + 0x10], ebx
jle 0x10004b95
mov eax, dword [ebp + 0xc]
mov esi, 0x84
lea edi, [eax + 0x28]
cmp dword [edi], ebx
mov dword [ebp + 8], ebx
jle 0x100049f5
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 - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
push dword [ebp - 0x38]
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x600]
push eax
call fcn.10004456
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 0x1000497f
cmp dword [edi + 8], ebx
mov dword [ebp + 8], ebx
jle 0x10004a77
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 - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
push dword [ebp - 0x38]
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x600]
push eax
call fcn.10004456
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 0x10004a00
cmp dword [edi + 4], ebx
mov dword [ebp + 8], ebx
jle 0x10004af9
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 - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
push dword [ebp - 0x38]
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x600]
push eax
call fcn.10004456
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 0x10004a82
cmp dword [edi + 0xc], ebx
mov dword [ebp + 8], ebx
jle 0x10004b7b
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 - 0x600]
push eax
lea ecx, [ebp - 0x10]
call fcn.100043f3
push dword [ebp - 0x38]
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x600]
push eax
call fcn.10004456
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 0x10004b04
inc dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
add edi, 0x50
cmp ecx, dword [eax + 0xa4]
jl 0x10004975
mov esi, eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
cmp dword [esi + 0xa4], ebx
jle 0x10004bc4
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
call fcn.100044b1
add dword [ebp + 0xc], 0x50
inc edi
cmp edi, dword [esi + 0xa4]
pop ecx
jl 0x10004bae
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
mov dword [0x10090a94], ebx
call fcn.100043f2
mov ecx, dword [ebp - 0xc]
push 1
pop eax
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret