Function at 0x428110
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x46af24]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 0x24], eax
xor eax, eax
xor ecx, ecx
push edi
push esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x3c], edi
mov word [ebp - 0x10], cx
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov byte [ebp - 6], al
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebx], edi
call dword [sym.imp.MSVCR100.dll__waccess]
add esp, 8
test eax, eax
je 0x428183
call dword [sym.imp.MSVCR100.dll__errno]
mov edx, dword [eax]
lea eax, [edi + 2]
pop edi
pop esi
mov dword [ebx], edx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
push 0x40
push 0x8000
push esi
call dword [sym.imp.MSVCR100.dll__wsopen]
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
jne 0x4281b9
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
mov dword [ebx], eax
pop edi
lea eax, [esi + 4]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.MSVCR100.dll__filelength]
add esp, 4
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
je 0x428503
cmp eax, edi
je 0x428503
push 0x9040
push 1
call dword [sym.imp.MSVCR100.dll_calloc]
mov edi, eax
add esp, 8
test edi, edi
jne 0x428215
call dword [sym.imp.MSVCR100.dll__errno]
mov ecx, dword [eax]
push esi
mov dword [ebx], ecx
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
lea eax, [edi + 4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.MSVCR100.dll__lseek]
push 2
push 0xffffffffffffffff
push esi
call ebx
push 1
lea edx, [ebp - 0x11]
push edx
push esi
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0x18
cmp eax, 1
je 0x42825a
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x20]
push esi
mov dword [ecx], eax
call dword [sym.imp.MSVCR100.dll__close]
push edi
or esi, 0xffffffff
call dword [sym.imp.MSVCR100.dll_free]
add esp, 8
xor edi, edi
mov al, byte [ebp - 0x11]
cmp al, 0x42
je 0x428298
cmp al, 0x54
je 0x428298
cmp esi, 0xffffffff
je 0x428274
push esi
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
test edi, edi
je 0x428282
push edi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
pop edi
pop esi
mov eax, 5
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
push 0
push 0
push esi
call ebx
mov edx, dword [ebp - 0x28]
add esp, 0xc
cmp byte [ebp - 0x11], 0x42
push 0
jne 0x428318
add edx, 0xfffffeff
push edx
push esi
call ebx
lea eax, [edi + 0x400]
push pe_nt_image_headers32
push eax
push esi
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0x18
cmp eax, 0x100
je 0x4283d1
call dword [sym.imp.MSVCR100.dll__errno]
mov ecx, dword [ebp - 0x20]
mov eax, dword [eax]
mov dword [ecx], eax
cmp esi, 0xffffffff
je 0x4282f4
push esi
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
test edi, edi
je 0x428302
push edi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
add edx, 0xfffffdff
push edx
push esi
call ebx
push 0x200
lea ebx, [edi + 0x800]
push ebx
push esi
call dword [sym.imp.MSVCR100.dll__read]
add esp, 0x18
cmp eax, 0x200
jne 0x4282d8
lea eax, [edi + 0x400]
mov word [ebp - 0x10], 0x7830
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], 0x40
mov edx, dword [ebx]
mov dword [ebp - 0xe], edx
mov eax, dword [ebx + 4]
lea ecx, [ebp - 7]
push ecx
lea edx, [ebp - 0xe]
push edx
mov dword [ebp - 0xa], eax
mov byte [ebp - 6], 0
call fcn.004280e0
lea eax, [ebp - 0xd]
push eax
lea ecx, [ebp - 0xe]
push ecx
call fcn.004280e0
lea edx, [ebp - 0xb]
push edx
lea eax, [ebp - 0xc]
push eax
call fcn.004280e0
lea ecx, [ebp - 9]
push ecx
lea edx, [ebp - 0xa]
push edx
call fcn.004280e0
lea eax, [ebp - 7]
push eax
lea ecx, [ebp - 8]
push ecx
call fcn.004280e0
push 0x10
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MSVCR100.dll_strtoul]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], eax
add ecx, 4
add esp, 0x34
add ebx, 8
dec dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
jne 0x428355
mov ebx, dword [sym.imp.MSVCR100.dll__lseek]
mov ecx, dword [ebp - 0x24]
push ecx
lea edx, [edi + 0x1000]
push edx
push 0x800
push 0x45a810
lea eax, [edi + 0x400]
push edi
push eax
call fcn.00428d80
push 0
push 0
push esi
call ebx
mov eax, dword [edi + 0x14]
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x18]
push 4
push edx
mov dword [ebp - 0x1c], 0xa3457934
mov dword [ebp - 0x18], eax
call fcn.00427920
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x24]
mov edx, dword [edi + 0x28]
push 0
mov dword [ebp - 0x4c], eax
mov eax, dword [edi + 0x2c]
push 0
push esi
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], eax
call ebx
add esp, 0x3c
cmp byte [ebp - 0x11], 0x42
jne 0x428489
mov ecx, dword [ebp - 0x24]
push ecx
push 0x10
lea edx, [ebp - 0x38]
push edx
push 0x101
push esi
call fcn.00427fc0
add esp, 0x14
test eax, eax
je 0x42849a
cmp esi, 0xffffffff
je 0x428469
push esi
call dword [sym.imp.MSVCR100.dll__close]
add esp, 4
push edi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
pop edi
pop esi
mov eax, 7
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x24]
push eax
push 0x10
lea ecx, [ebp - 0x38]
push ecx
push 0x201
jmp 0x42844d
push esi
call dword [sym.imp.MSVCR100.dll__close]
push edi
call dword [sym.imp.MSVCR100.dll_free]
mov edx, dword [ebp - 0x28]
add esp, 8
cmp edx, dword [ebp - 0x18]
jne 0x428282
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], eax
jne 0x428282
mov ecx, dword [ebp - 0x48]
cmp dword [ebp - 0x34], ecx
jne 0x428282
mov edx, dword [ebp - 0x44]
cmp dword [ebp - 0x30], edx
jne 0x428282
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x2c], eax
jne 0x428282
mov ecx, dword [ebp - 0x20]
pop edi
pop esi
mov dword [ecx], 2
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004534b8
mov esp, ebp
pop ebp
ret
call dword [sym.imp.MSVCR100.dll__errno]
mov edx, dword [eax]
push esi
mov dword [ebx], edx
call dword [sym.imp.MSVCR100.dll__close]
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004534b8
mov esp, ebp
pop ebp
ret