Function at 0x4012c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
sub esp, 0x20
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x10], 0
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push SysReAllocString
push section..bss
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebx, eax
push 2
push 0
push 0xffffffffffffffec
push ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
je 0x401740
lea ecx, [ebp - 0x18]
lea esi, [ebp - 0x2c]
push 0
push esi
push 4
push ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401750
cmp dword [ebp - 0x2c], 4
jb 0x401750
push dword [ebp - 0x18]
call fcn.004011f0
cmp eax, 0x38424452
pop ecx
jne 0x401750
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x28]
push 0
push edx
push 4
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401760
cmp dword [ebp - 0x2c], 4
jb 0x401760
push dword [ebp - 0x28]
call fcn.004011f0
cmp eax, 5
pop ecx
jne 0x401760
lea ecx, [ebp - 0x2c]
lea edi, [ebp - 0x10]
push 0
push ecx
push 4
push edi
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401770
cmp dword [ebp - 0x2c], 4
jb 0x401770
push dword [ebp - 0x10]
call fcn.004011f0
pop ecx
mov dword [ebp - 0x10], eax
push 0
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
je 0x401780
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x18]
push 0
push edx
push 4
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401790
cmp dword [ebp - 0x2c], 4
jb 0x401790
push dword [ebp - 0x18]
call fcn.004011f0
cmp eax, 0x38424452
pop ecx
jne 0x401790
lea esi, [ebp - 0x24]
push esi
push 0x40812c
push ebx
call fcn.00401220
add esp, 0xc
push 0x455204
push 0x455200
push ebx
call fcn.00401220
add esp, 0xc
lea ecx, [ebp - 0x2c]
push 0
push ecx
push 1
push 0x45520d
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4017a0
cmp dword [ebp - 0x2c], 1
jb 0x4017a0
lea edi, [ebp - 0x2c]
push 0
push edi
push 1
push 0x455211
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4017b0
cmp dword [ebp - 0x2c], 1
jb 0x4017b0
lea edx, [ebp - 0x2c]
push 0
push edx
push 1
push 0x45520f
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4017c0
cmp dword [ebp - 0x2c], 1
jb 0x4017c0
lea eax, [ebp - 0x2c]
push 0
push eax
push 1
push 0x455210
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4017d0
cmp dword [ebp - 0x2c], 1
jb 0x4017d0
lea esi, [ebp - 0x2c]
push 0
push esi
push 1
push 0x45520e
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4017e0
cmp dword [ebp - 0x2c], 1
jb 0x4017e0
lea ecx, [ebp - 0x2c]
push 0
push ecx
push 4
push 0x455214
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4017f0
cmp dword [ebp - 0x2c], 1
jb 0x4017f0
push dword [0x455214]
call fcn.004011f0
cmp eax, 3
pop ecx
mov dword [0x455214], eax
jne 0x401693
lea edx, [ebp - 0x1c]
lea edi, [ebp - 0x2c]
push 0
push edi
push 4
push edx
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401800
cmp dword [ebp - 0x2c], 1
jb 0x401800
push dword [ebp - 0x1c]
call fcn.004011f0
pop ecx
mov dword [ebp - 0x1c], eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
test eax, eax
mov dword [0x455218], eax
je 0x401810
lea eax, [ebp - 0x2c]
push 0
push eax
push dword [ebp - 0x1c]
push dword [0x455218]
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401818
cmp dword [ebp - 0x2c], 1
jb 0x401818
xor esi, esi
mov dword [ebp - 0x20], 0x455220
lea eax, [eax]
lea ecx, [ebp - 0x2c]
push 0
push ecx
push 4
push dword [ebp - 0x20]
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x4015c5
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
mov edi, esi
push dword [edi*4 + 0x455220]
call fcn.004011f0
add esi, 1
pop ecx
add dword [ebp - 0x20], 4
cmp esi, 6
mov dword [edi*4 + 0x455220], eax
jl 0x4015a0
xor edi, edi
mov esi, 0x455238
lea edx, [ebp - 0x2c]
push edx
push esi
push ebx
call fcn.00401220
add edi, 1
add esp, 0xc
add esi, 4
cmp edi, 6
jl 0x4015ee
lea eax, [ebp - 0x2c]
push 0
push eax
push 4
push 0x455250
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401827
push dword [0x455250]
call fcn.004011f0
pop ecx
lea ecx, [ebp - 0x2c]
mov dword [0x455250], eax
push 0
push ecx
push 1
push 0x455254
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401836
lea edx, [ebp - 0x2c]
push 0
push edx
push 1
push 0x455255
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401845
lea eax, [ebp - 0x2c]
push 0
push eax
push 1
push 0x455256
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x401693
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
lea edi, [ebp - 0x2c]
push 0
push edi
push 1
push 0x45520c
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401854
cmp dword [ebp - 0x2c], 1
jb 0x401854
cmp byte [0x45520c], 0
je 0x401890
lea ecx, [ebp - 0x14]
lea esi, [ebp - 0x2c]
push 0
push esi
push 4
push ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401863
cmp dword [ebp - 0x2c], 1
jb 0x401863
push dword [ebp - 0x14]
call fcn.004011f0
pop ecx
mov dword [ebp - 0x14], eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
test eax, eax
mov dword [0x45521c], eax
je 0x401872
lea edx, [ebp - 0x2c]
push 0
push edx
push dword [ebp - 0x14]
push dword [0x45521c]
push ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x401880
cmp dword [ebp - 0x2c], 1
jae 0x401890
jmp 0x401880
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret
lea ecx, [ebp - 0x24]
push ecx
push 0x455208
push ebx
call fcn.00401220
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esp, [ebp - 0xc]
pop edi
pop esi
pop ebx
pop ebp
ret