Function at 0x4058a8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x406121
push dword fs:[eax]
mov dword fs:[eax], esp
xor edx, edx
mov eax, 0x7c00
call fcn.00403b4c
cmp dword [0x408590], 0xffffffff
jne 0x405903
push 0
push 0x406130
push 0x406140
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x4060f9
push 0x12d
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
mov dword [ebp - 0x1c], eax
mov eax, 0x102
call fcn.004023c0
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x4060f2
push dword fs:[edx]
mov dword fs:[edx], esp
mov dword [0x408488], 0xffffffff
mov byte [0x40848c], 0
cmp byte [ebp - 5], 0
je 0x405ff6
push 0
push 0
push 0x184
mov eax, dword [ebp - 0x1c]
push eax
call sub.user32.dll_SendMessageA
jmp 0x405ff6
mov eax, dword [0x408590]
mov dword [ebp - 0x20], eax
mov al, byte [0x4085ec]
sub al, 2
jb 0x40597d
je 0x4059fc
jmp 0x405aa9
push 0
lea eax, [ebp - 0x24]
push eax
push 1
push 0x4085ed
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x24]
push eax
xor eax, eax
mov al, byte [0x4085ed]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
lea ecx, [ebp - 0x14]
xor edx, edx
mov dl, byte [0x4085ed]
mov eax, dword [ebp - 0xc]
call fcn.00403de4
push 0
lea eax, [ebp - 0x24]
push eax
xor eax, eax
mov al, byte [0x4085d8]
sub eax, 0x16
xor edx, edx
mov dl, byte [0x4085ed]
sub eax, edx
add eax, 2
push eax
push 0x4085f2
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
add dword [ebp - 0x20], 2
jmp 0x405ab3
push 0
lea eax, [ebp - 0x24]
push eax
push 2
push 0x4085f2
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x24]
push eax
push 1
push 0x4085fc
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x24]
push eax
push 1
push 0x4085ed
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x24]
push eax
push 2
mov ebx, dword [ebp - 0xc]
push ebx
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x24]
push eax
xor eax, eax
mov al, byte [0x4085ed]
sub eax, 3
push eax
push ebx
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
lea ecx, [ebp - 0x14]
xor edx, edx
mov dl, byte [0x4085ed]
sub dx, 3
mov eax, dword [ebp - 0xc]
call fcn.00403de4
push 0
lea eax, [ebp - 0x24]
push eax
push 2
push 0x4085f5
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
jmp 0x405ab3
call fcn.00402908
jmp 0x4060f9
mov eax, pe_nt_image_headers32
call fcn.004023c0
mov dword [ebp - 0x28], eax
xor edx, edx
push ebp
push 0x405b8f
push dword fs:[edx]
mov dword fs:[edx], esp
jmp 0x405b62
push 0
lea edx, [ebp - 0x24]
push edx
movzx eax, ax
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [0x408614]
push eax
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebp - 0x28]
mov al, byte [eax]
sub al, 2
je 0x405af7
jmp 0x405b4b
mov eax, dword [ebp - 0x28]
call fcn.00403b38
mov edx, eax
lea ecx, [ebp - 0x10]
mov eax, dword [ebp - 0x28]
call fcn.00403de4
lea edx, [ebp - 0x48]
mov eax, dword [ebp - 0x10]
call fcn.00403838
mov edx, dword [ebp - 0x48]
mov eax, 0x4085f7
call fcn.00402b9c
mov eax, dword [0x4085f7]
call fcn.00402d90
call fcn.00403f3c
mov edx, eax
lea eax, [ebp - 0x48]
call fcn.00402c78
mov edx, dword [ebp - 0x48]
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
call fcn.00402d0c
movzx eax, word [0x4085f5]
mov edx, dword [ebp - 0x28]
lea eax, [edx + eax - 2]
mov ax, word [eax]
mov word [0x4085f5], ax
mov ax, word [0x4085f5]
test ax, ax
jbe 0x405b77
cmp ax, 0x100
jb 0x405ad3
pop dword fs:[0]
add esp, 8
push 0x405b96
mov eax, dword [ebp - 0x28]
call fcn.004023d8
ret
call fcn.00405790
test al, al
jne 0x405961
cmp byte [ebp - 5], 0
jne 0x40605d
push 0
push 0
push 0x190
mov eax, dword [ebp - 0x1c]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
jne 0x40603e
push 0x40622c
push 0
push 0xc
push 0x259
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SendMessageA
jmp 0x40608c
push 0x40626c
push 0
push 0xc
push 0x259
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SendMessageA
jmp 0x40608c
cmp byte [ebp - 5], 0
je 0x40608c
push 0
push 0
push 0x18b
mov eax, dword [ebp - 0x1c]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
jne 0x40608c
push 0
push 0x4062a4
push 0x4062b0
push 0
call sub.user32.dll_MessageBoxA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4060f9
mov eax, dword [ebp - 0xc]
call fcn.004023d8
push 0
push 0
push 0x18b
mov eax, dword [ebp - 0x1c]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
cmp byte [0x40848c], 0
jne 0x4060f1
push 0
push 0
push 0xf1
push 0x191
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SendMessageA
push 0
push 0x191
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_EnableWindow
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406128
lea eax, [ebp - 0x4c]
mov edx, 2
call fcn.00402b6c
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00402b6c
ret