Function at 0x405f4c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov byte [ebp - 5], cl
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4066eb
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [0x408204], 1
mov byte [0x409600], 0
mov dword [0x409788], 0x4034b51
dec dword [0x409788]
mov byte [ebp - 0xd], 0
xor edx, edx
mov eax, dword [0x4095f0]
call fcn.00403a3c
cmp dword [0x4095ec], 0xffffffff
jne 0x405fcf
mov byte [0x408204], 0
push 0x10
push 0x4066fc
push 0x406704
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x4066c8
push ebx
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
mov dword [ebp - 0x24], eax
mov eax, 0x102
call fcn.004023c0
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x4066c1
push dword fs:[edx]
mov dword fs:[edx], esp
mov dword [0x40948c], 0xffffffff
mov byte [0x409490], 0
cmp byte [ebp - 5], 0
je 0x4065e8
push 0
push 0
push 0x184
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x4065e8
mov edx, 1
xor eax, eax
call fcn.00403a3c
mov eax, dword [0x4095ec]
mov dword [ebp - 0x28], eax
push 0
lea eax, [ebp - 0x2c]
push eax
movzx eax, word [0x4097d6]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
mov edx, 1
xor eax, eax
call fcn.00403a3c
lea ecx, [ebp - 0x1c]
mov dx, word [0x4097d6]
mov eax, dword [ebp - 0xc]
call fcn.00403cdc
cmp dword [ebp - 0x1c], 0
jne 0x4060a2
mov byte [0x408204], 0
push 0x10
push 0x4066fc
push 0x40671c
push 0
call sub.user32.dll_MessageBoxA_1
call fcn.00402870
jmp 0x4066c8
cmp byte [0x409490], 0
jne 0x4060d4
mov edx, dword [ebp - 0x1c]
mov eax, 0x406738
call fcn.00402e98
test eax, eax
jg 0x4060cd
mov edx, dword [ebp - 0x1c]
mov eax, 0x406744
call fcn.00402e98
test eax, eax
jle 0x4060d4
mov byte [0x409490], 1
mov edx, 1
xor eax, eax
call fcn.00403a3c
mov ax, word [0x4097d8]
test ax, ax
jbe 0x4060f8
movzx eax, ax
mov edx, 1
call fcn.00403a3c
cmp byte [ebp - 5], 0
je 0x40611c
mov eax, dword [ebp - 0x1c]
call fcn.00402dd0
push eax
push 0
push 0x180
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x4065c8
mov eax, dword [ebp - 0x1c]
call fcn.00402dd0
mov edx, eax
mov eax, dword [ebp - 0x24]
call fcn.004038f8
test al, al
je 0x4065c8
mov byte [ebp - 0xd], 0
mov ax, word [0x4097c2]
and ax, 1
cmp ax, 1
jne 0x4062a0
sub dword [0x4097b0], 0xc
xor eax, eax
push ebp
push 0x406294
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x18
call fcn.004023c0
mov dword [ebp - 0x14], eax
push 0
lea eax, [ebp - 0x2c]
push eax
push 0xc
mov ebx, dword [ebp - 0x14]
push ebx
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0xc]
mov eax, ebx
mov ecx, 0xc
call fcn.004024bc
xor eax, eax
push ebp
push 0x406283
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x4095e4], 0
je 0x4061d6
mov eax, dword [0x4097ca]
push eax
mov eax, dword [0x4097c6]
push eax
mov eax, dword [0x4095e4]
push eax
mov cx, word [0x4097c2]
mov dl, 0xc
mov eax, dword [ebp - 0x14]
call fcn.00406980
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x40626d
mov bl, 3
mov byte [0x408204], 0
push 0x7f00
push 0
call sub.user32.dll_LoadCursorA
push eax
call sub.user32.dll_SetCursor
push 0x406bf8
mov edx, 0x406748
xor ecx, ecx
mov eax, dword [0x40900c]
call fcn.0040381c
mov byte [0x408204], 1
lea ecx, [ebp - 0x4c]
mov eax, 0x409594
mov dx, word [0x4095e8]
call fcn.00403cdc
mov edx, dword [ebp - 0x4c]
mov eax, 0x4095e4
call fcn.00402b04
mov eax, dword [0x4097ca]
push eax
mov eax, dword [0x4097c6]
push eax
mov eax, dword [0x4095e4]
push eax
mov cx, word [0x4097c2]
mov dl, 0xc
mov eax, dword [ebp - 0x14]
call fcn.00406980
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x40626d
dec bl
jne 0x4061e2
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40628a
mov eax, dword [ebp - 0x14]
call fcn.004023d8
ret
mov byte [ebp - 0xd], 1
cmp byte [ebp - 0xd], 0
je 0x4065f5
mov eax, 0x409494
call fcn.00403e34
call fcn.00403a28
push eax
mov eax, 0x409494
call fcn.00403e58
lea ecx, [ebp - 0x4c]
pop edx
call fcn.00403cdc
push dword [ebp - 0x4c]
push 0x406738
push dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.00402ccc
mov eax, dword [ebp - 0x20]
call fcn.00402dd0
mov ebx, eax
mov eax, ebx
call fcn.00403bf0
test al, al
je 0x4063a1
mov al, byte [0x4095f4]
dec al
je 0x406314
dec al
je 0x40632f
jmp 0x4063dd
mov eax, dword [0x40948c]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x4065c8
lea edx, [ebp - 0x4c]
mov eax, dword [ebp - 0x20]
call fcn.00403b48
mov edx, dword [ebp - 0x4c]
mov eax, 0x4095f8
call fcn.00402b04
mov byte [0x408204], 0
push 0x7f00
push 0
call sub.user32.dll_LoadCursorA
push eax
call sub.user32.dll_SetCursor
push 0x406a68
mov edx, 0x406750
xor ecx, ecx
mov eax, dword [0x40900c]
call fcn.0040381c
mov byte [0x408204], 1
cmp byte [0x4095f5], 0
jne 0x4063dd
mov eax, dword [0x40948c]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x4065c8
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x20]
call fcn.00403a7c
mov eax, dword [ebp - 0x18]
call fcn.00403d84
mov eax, dword [ebp - 0x18]
call fcn.00402dd0
mov esi, eax
mov eax, esi
call fcn.00403bf0
test al, al
jne 0x4063dd
push 0x10
push 0x40675c
push esi
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x4065f5
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push ebx
call sub.kernel32.dll_CreateFileA_1
mov dword [0x4097b8], eax
cmp dword [0x4097b8], 0xffffffff
je 0x406582
xor eax, eax
push ebp
push 0x40657b
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x40652d
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 0x40677c
lea eax, [ebp - 0x4c]
call fcn.00402b48
lea eax, [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
call fcn.00402c14
mov eax, dword [ebp - 0x4c]
call fcn.00402dd0
push eax
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
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x48]
push eax
call sub.user32.dll_PeekMessageA
lea eax, [ebp - 0x48]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x48]
push eax
call sub.user32.dll_DispatchMessageA
mov dword [0x409778], 0xffffffff
mov eax, dword [0x4097ce]
mov dword [0x4097b0], eax
mov ax, word [0x4097c2]
and ax, 1
cmp ax, 1
jne 0x4064aa
sub dword [0x4097b0], 0xc
mov ax, word [0x4097c4]
sub ax, 1
jb 0x4064be
sub ax, 7
je 0x4064c5
jmp 0x4064cc
call fcn.00403930
jmp 0x4064fd
call fcn.00404f74
jmp 0x4064fd
mov byte [0x408204], 0
push 0x10
push 0x4066fc
push 0x40678c
push 0
call sub.user32.dll_MessageBoxA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00402870
call fcn.00402870
jmp 0x4066c8
mov eax, dword [0x409778]
xor eax, 0xffffffff
cmp eax, dword [0x4097ca]
jne 0x406523
mov eax, dword [0x40948c]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x406537
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4065c8
mov edx, dword [0x4097c6]
mov eax, dword [0x4097b8]
call fcn.00403834
mov eax, dword [0x4097b8]
push eax
call sub.kernel32.dll_CloseHandle_1
test eax, eax
jne 0x40657a
push 0x10
push 0x4067a8
mov eax, dword [ebp - 0x20]
call fcn.00402dd0
push eax
push 0
call sub.user32.dll_MessageBoxA_1
ret
mov eax, dword [ebp - 0x20]
call fcn.00402dd0
mov ebx, eax
push ebx
call sub.kernel32.dll_GetFileAttributesA
mov esi, eax
push ebx
call sub.kernel32.dll_GetFileAttributesA
and eax, 0xffffffef
cmp esi, eax
jne 0x4065b2
push 0x10
push 0x4067c0
push ebx
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x4065c8
mov eax, dword [0x40948c]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
movzx eax, word [0x4097d6]
add eax, dword [ebp - 0x28]
movzx edx, word [0x4097d8]
add eax, edx
add eax, dword [0x4097ce]
xor edx, edx
call fcn.00403a3c
call fcn.00405ea8
test al, al
jne 0x406029
mov byte [0x408204], 0
cmp byte [ebp - 0xd], 0
je 0x40667c
cmp byte [ebp - 5], 0
jne 0x40667c
push 0
push 0
push 0x190
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
jne 0x406643
cmp byte [0x4081ec], 0
jne 0x40663a
push 0
push 0x4067d4
push 0x4067e0
push 0
call sub.user32.dll_MessageBoxA_1
mov byte [0x409600], 1
jmp 0x4066ab
push 0x10
push 0x4066fc
push 0x406800
push 0
call sub.user32.dll_MessageBoxA_1
push 0x406800
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
mov byte [0x409600], 0
jmp 0x4066ab
cmp byte [ebp - 5], 0
je 0x4066ab
push 0
push 0
push 0x18b
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
jne 0x4066ab
push 0x10
push 0x4066fc
push 0x406704
push 0
call sub.user32.dll_MessageBoxA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4066c8
mov eax, dword [ebp - 0xc]
call fcn.004023d8
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4066f2
lea eax, [ebp - 0x4c]
call fcn.00402ab4
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.00402ad4
ret