Function at 0x428530
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
push edi
mov edi, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebx], esi
call dword [sym.imp.MSVCR100.dll__waccess]
add esp, 8
test eax, eax
je 0x428572
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
mov dword [ebx], eax
pop edi
lea eax, [esi + 2]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x40
push 0x8000
push edi
call dword [sym.imp.MSVCR100.dll__wsopen]
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
jne 0x42859e
call dword [sym.imp.MSVCR100.dll__errno]
mov ecx, dword [eax]
lea eax, [edi + 4]
pop edi
pop esi
mov dword [ebx], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.MSVCR100.dll__filelength]
add esp, 4
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x428785
cmp eax, esi
je 0x428785
push 0x9040
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x4285ee
call dword [sym.imp.MSVCR100.dll__errno]
mov edx, dword [eax]
push edi
mov dword [ebx], edx
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
pop edi
lea eax, [esi + 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.MSVCR100.dll__lseek]
push 2
push 0xffffffffffffffff
push edi
call ebx
push 1
lea eax, [ebp - 1]
push eax
push edi
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0x18
cmp eax, 1
je 0x42863a
call dword [sym.imp.MSVCR100.dll__errno]
mov ecx, dword [eax]
mov edx, dword [ebp + 0xc]
push edi
mov dword [edx], ecx
call dword [sym.imp.MSVCR100.dll__close]
push esi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp - 1], 0x42
je 0x42865d
push edi
call dword [sym.imp.MSVCR100.dll__close]
push esi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 8
pop edi
pop esi
mov eax, 5
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push edi
call ebx
add esp, 0xc
cmp byte [ebp - 1], 0x42
jne 0x428640
mov eax, dword [ebp - 8]
push 0
add eax, 0xfffffeff
push eax
push edi
call ebx
lea eax, [esi + 0x400]
push pe_nt_image_headers32
push eax
push edi
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0x18
cmp eax, 0x100
jne 0x428610
push 0
lea eax, [esi + 0x1000]
push eax
push 0x800
push 0x45a810
lea eax, [esi + 0x400]
push esi
push eax
call fcn.00428d80
push 0
push 0
push edi
call ebx
mov ecx, dword [esi + 0x14]
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp + 0xc]
push 4
push eax
mov dword [ebp - 0xc], 0xa3457934
mov dword [ebp + 0xc], ecx
call fcn.00427920
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
mov eax, dword [esi + 0xc]
push 0
mov dword [ebp - 0x2c], ecx
mov ecx, dword [esi + 0x10]
push 0
push edi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], ecx
call ebx
push 0
push 0x10
lea edx, [ebp - 0x1c]
push edx
push edi
call fcn.00427d90
add esp, 0x4c
push edi
test eax, eax
je 0x428730
call dword [sym.imp.MSVCR100.dll__close]
push esi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 8
pop edi
pop esi
mov eax, 7
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.MSVCR100.dll__close]
push esi
call dword [sym.imp.MSVCR100.dll_free]
mov eax, dword [ebp - 8]
add esp, 8
cmp eax, dword [ebp + 0xc]
jne 0x428651
mov ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x1c], ecx
jne 0x428651
mov edx, dword [ebp - 0x28]
cmp dword [ebp - 0x18], edx
jne 0x428651
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x14], eax
jne 0x428651
mov ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x10], ecx
jne 0x428651
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.MSVCR100.dll__errno]
mov edx, dword [eax]
push edi
mov dword [ebx], edx
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret