Function at 0x4053ac
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeac
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x405a1c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [0x409a95], 0
mov byte [0x409a84], 0
mov dword [0x409aec], 0x4034b51
dec dword [0x409aec]
mov byte [ebp - 9], 0
xor edx, edx
mov eax, dword [0x409a70]
call fcn.00403cf8
cmp dword [0x409a6c], 0xffffffff
jne 0x405427
push 0x10
mov eax, dword [0x4081e4]
push eax
push 0x405a2c
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x4059f9
mov eax, 0x102
call fcn.004023c8
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x4059f2
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [0x40948c], 0xffffffff
mov byte [0x409490], 0
jmp 0x405987
mov eax, dword [0x409a6c]
mov dword [ebp - 0x20], eax
push 0
lea eax, [ebp - 0x24]
push eax
movzx eax, word [0x409b16]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x409af4]
push eax
call sub.kernel32.dll_ReadFile_1
lea ecx, [ebp - 0x18]
mov dx, word [0x409b16]
mov eax, dword [ebp - 8]
call fcn.00403f18
cmp dword [ebp - 0x18], 0
jne 0x4054b3
push 0x10
mov eax, dword [0x4081e4]
push eax
push 0x405a44
push 0
call sub.user32.dll_MessageBoxA_1
call fcn.004029f4
jmp 0x4059f9
cmp byte [0x409490], 0
jne 0x4054e5
mov edx, dword [ebp - 0x18]
mov eax, 0x405a60
call fcn.00402f90
test eax, eax
jg 0x4054de
mov edx, dword [ebp - 0x18]
mov eax, 0x405a6c
call fcn.00402f90
test eax, eax
jle 0x4054e5
mov byte [0x409490], 1
mov byte [ebp - 9], 0
mov ax, word [0x409b02]
and ax, 1
cmp ax, 1
jne 0x405696
sub dword [0x409af0], 0xc
xor eax, eax
push ebp
push 0x40568a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x18
call fcn.004023c8
mov dword [ebp - 0x10], eax
push 0
lea eax, [ebp - 0x24]
push eax
push 0xc
mov ebx, dword [ebp - 0x10]
push ebx
mov eax, dword [0x409af4]
push eax
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebp - 0x10]
lea edx, [eax + 0xc]
mov eax, ebx
mov ecx, 0xc
call fcn.00402500
xor eax, eax
push ebp
push 0x405679
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x409668], 0
je 0x405585
mov eax, dword [0x409b0a]
push eax
mov eax, dword [0x409b06]
push eax
mov eax, dword [0x409668]
push eax
mov cx, word [0x409b02]
mov dl, 0xc
mov eax, dword [ebp - 0x10]
call fcn.00405c68
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
jne 0x405663
mov bl, 3
lea eax, [ebp - 0x54]
mov edx, 0x409498
mov ecx, 0x50
call fcn.00402d84
cmp dword [ebp - 0x54], 0
jne 0x405637
push 0x406f20
mov edx, 0x405a70
xor ecx, ecx
mov eax, dword [0x40900c]
call fcn.004038b8
dec eax
je 0x4055dd
call fcn.004029f4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.004029f4
jmp 0x4059f9
lea ecx, [ebp - 0x54]
mov eax, 0x409498
mov dx, word [0x40966c]
call fcn.00403f18
mov edx, dword [ebp - 0x54]
mov eax, 0x409668
call fcn.00402c88
mov eax, dword [0x409b0a]
push eax
mov eax, dword [0x409b06]
push eax
mov eax, dword [0x409668]
push eax
mov cx, word [0x409b02]
mov dl, 0xc
mov eax, dword [ebp - 0x10]
call fcn.00405c68
mov byte [ebp - 9], al
mov esi, 0x405a7c
mov edi, 0x409498
mov ecx, 0x14
rep movsd dword es:[edi], dword [esi]
jmp 0x405655
lea ecx, [ebp - 0x54]
mov eax, 0x409498
mov dx, 4
call fcn.00403f18
mov edx, dword [ebp - 0x54]
mov eax, 0x409668
call fcn.00402c88
cmp byte [ebp - 9], 0
jne 0x405663
dec bl
jne 0x405591
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405680
mov eax, dword [ebp - 0x10]
call fcn.004023e0
ret
mov byte [ebp - 9], 1
cmp byte [ebp - 9], 0
je 0x40596b
lea eax, [ebp - 0x154]
mov edx, dword [0x409494]
call fcn.0040274c
mov edx, 0x405acc
lea eax, [ebp - 0x154]
call fcn.00402604
lea edx, [ebp - 0x154]
lea eax, [ebp - 0x54]
call fcn.00402d48
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
call fcn.00402de8
mov eax, dword [ebp - 0x1c]
call fcn.00402f10
mov ebx, eax
mov eax, ebx
call fcn.00403e2c
test al, al
jne 0x405732
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
call fcn.00403d34
mov eax, dword [ebp - 0x14]
call fcn.00403fc0
mov eax, dword [ebp - 0x14]
call fcn.00402f10
mov esi, eax
mov eax, esi
call fcn.00403e2c
test al, al
jne 0x405732
push 0x10
push 0x405ad0
push esi
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x405994
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push ebx
call sub.kernel32.dll_CreateFileA_1
mov dword [0x409af8], eax
cmp dword [0x409af8], 0xffffffff
je 0x405944
xor eax, eax
push ebp
push 0x40593d
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4058c1
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 0x405af0
lea eax, [ebp - 0x54]
call fcn.00402ccc
lea eax, [ebp - 0x54]
mov edx, dword [0x4081f0]
call fcn.00402da4
lea eax, [ebp - 0x54]
mov edx, dword [ebp - 0x1c]
call fcn.00402da4
mov eax, dword [ebp - 0x54]
call fcn.00402f10
push eax
push 0
push 0xc
push 0xbba
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SendMessageA
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x50]
push eax
call sub.user32.dll_PeekMessageA
lea eax, [ebp - 0x50]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x50]
push eax
call sub.user32.dll_DispatchMessageA
cmp byte [0x409a95], 0xff
jae 0x405807
xor eax, eax
mov al, byte [0x409a95]
lea eax, [eax*4 + 0x409670]
mov edx, dword [ebp - 0x1c]
call fcn.00402c88
inc byte [0x409a95]
mov dword [0x409adc], 0xffffffff
mov eax, dword [0x409b0e]
mov dword [0x409af0], eax
mov ax, word [0x409b02]
and ax, 1
cmp ax, 1
jne 0x405832
sub dword [0x409af0], 0xc
mov ax, word [0x409b04]
sub ax, 1
jb 0x405846
sub ax, 7
je 0x40584d
jmp 0x405854
call fcn.00403bcc
jmp 0x4058b7
call fcn.00405110
jmp 0x4058b7
push 0x10
mov eax, dword [0x4081e4]
push eax
mov eax, dword [0x4081ec]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.004029f4
call fcn.004029f4
jmp 0x4059f9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4058cb
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40596b
lea eax, [ebp - 0x2c]
push eax
mov ax, word [0x409b06]
and ax, 0xffff
push eax
mov eax, dword [0x409b06]
shr eax, 0x10
push eax
call sub.kernel32.dll_DosDateTimeToFileTime
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.kernel32.dll_LocalFileTimeToFileTime
lea eax, [ebp - 0x34]
push eax
push 0
push 0
mov eax, dword [0x409af8]
push eax
call sub.kernel32.dll_SetFileTime
mov eax, dword [0x409af8]
push eax
call sub.kernel32.dll_CloseHandle_1
test eax, eax
jne 0x40593c
push 0x10
mov eax, dword [0x4081e0]
push eax
mov eax, dword [ebp - 0x1c]
call fcn.00402f10
push eax
push 0
call sub.user32.dll_MessageBoxA_1
ret
push ebx
call sub.kernel32.dll_GetFileAttributesA
mov esi, eax
push ebx
call sub.kernel32.dll_GetFileAttributesA
and eax, 0xffffffef
cmp esi, eax
jne 0x405994
push 0x10
mov eax, dword [0x4081dc]
push eax
push ebx
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x405994
mov eax, dword [ebp - 0x20]
add eax, 0x1e
movzx edx, word [0x409b16]
add eax, edx
add eax, dword [0x409b0e]
xor edx, edx
call fcn.00403cf8
call fcn.00405308
test al, al
jne 0x405458
cmp byte [ebp - 9], 0
je 0x4059a3
mov byte [0x409a84], 1
jmp 0x4059dc
push 0x10
mov eax, dword [0x4081e4]
push eax
mov eax, dword [0x4081e8]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
push 0x405afc
push 0
push 0xc
push 0xbba
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SendMessageA
mov byte [0x409a84], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4059f9
mov eax, dword [ebp - 8]
call fcn.004023e0
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405a23
lea eax, [ebp - 0x54]
call fcn.00402c38
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00402c58
ret