Function at 0x403f70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x564490]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
push ebx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
push 0
cmp esi, 0xffffffff
jne 0x403fcf
push ebx
push 0x51f348
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004fa7f1
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x18]
push eax
push 0xe
lea ecx, [ebp - 0x14]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404219
cmp dword [ebp - 0x18], 0xe
jne 0x404219
mov edx, 0x4d42
cmp word [ebp - 0x14], dx
jne 0x4041ee
cmp word [ebp - 0xe], 0
jne 0x4041ee
cmp word [ebp - 0xc], 0
jne 0x4041ee
push edi
push 0x2c
call fcn.004fb154
mov edi, eax
add esp, 4
test edi, edi
jne 0x404053
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebx
push 0x51f330
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004fa7f1
mov esp, ebp
pop ebp
ret 4
push 0
lea eax, [ebp - 0x18]
push eax
push 0x28
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4041d1
cmp dword [ebp - 0x18], 0x28
jne 0x4041d1
cmp dword [edi], 0x28
je 0x404094
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004fb11a
add esp, 4
push 0
push ebx
push str.OS_2
jmp 0x404036
mov edx, dword [ebp - 0x20]
push edi
mov ecx, edx
call fcn.00403a00
movzx ebx, ax
push edi
mov ecx, edx
mov dword [ebp - 0x24], ebx
call fcn.00403a20
imul eax, dword [edi + 8]
movzx ecx, bx
mov dword [ebp - 0x2c], ecx
lea ecx, [ecx + eax + 0x28]
push ecx
push edi
mov dword [ebp - 0x28], eax
call fcn.004fb1e8
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4040f4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1c]
push ebx
push edx
push 0x51f2f8
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call fcn.004fb11a
add esp, 4
jmp 0x40403e
cmp word [ebp - 0x24], 0
je 0x404139
mov edi, dword [ebp - 0x2c]
push 0
lea eax, [ebp - 0x18]
push eax
push edi
lea ecx, [ebx + 0x28]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404119
cmp dword [ebp - 0x18], edi
je 0x404139
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.004fb11a
mov edx, dword [ebp - 0x1c]
add esp, 4
push 0
push edx
push 0x51f2e4
jmp 0x404036
mov eax, dword [ebp - 0xa]
test eax, eax
je 0x404171
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x404171
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.004fb11a
mov eax, dword [ebp - 0x1c]
add esp, 4
push 0
push eax
push 0x51f2cc
jmp 0x404036
mov edi, dword [ebp - 0x28]
push 0
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x20]
push edi
push ebx
call fcn.00403d00
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4041b1
cmp dword [ebp - 0x18], edi
jne 0x4041b1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004fa7f1
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.004fb11a
mov edx, dword [ebp - 0x1c]
add esp, 4
push 0
push edx
push 0x51f2bc
jmp 0x404036
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004fb11a
add esp, 4
push 0
push ebx
push 0x51f2a4
jmp 0x404036
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push ebx
push 0x51f290
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004fa7f1
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push ebx
push 0x51f27c
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004fa7f1
mov esp, ebp
pop ebp
ret 4