Function at 0x40674c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], 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 0x406f55
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [0x40821c], 1
mov eax, dword [0x4082a8]
mov byte [eax], 0
mov dword [0x409980], 0x4034b51
dec dword [0x409980]
mov byte [ebp - 0xd], 0
mov eax, dword [0x408288]
push dword [eax + 4]
push dword [eax]
xor eax, eax
call fcn.00403f84
mov eax, dword [0x408254]
cmp dword [eax + 4], 0xffffffff
jne 0x4067e5
cmp dword [eax], 0xffffffff
jne 0x4067e5
mov byte [0x40821c], 0
push 0x10
push 0x406f64
push 0x406f6c
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x406f2d
push ebx
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
mov dword [ebp - 0x24], eax
mov eax, 0x102
call fcn.00402458
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x406f26
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x40825c]
mov dword [eax], 0xffffffff
mov eax, dword [0x408220]
mov byte [eax], 0
cmp byte [ebp - 5], 0
je 0x406e4d
push 0
push 0
push 0x184
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406e4d
push 0
push 0
mov eax, 1
call fcn.00403f84
mov eax, dword [0x408254]
mov edx, dword [eax]
mov dword [ebp - 0x30], edx
mov edx, dword [eax + 4]
mov dword [ebp - 0x2c], edx
push 0
lea eax, [ebp - 0x34]
push eax
movzx eax, word [0x4099d6]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x4099b4]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x34]
mov byte [eax], 0
push 0
push 0
mov eax, 1
call fcn.00403f84
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.user32.dll_OemToCharA
lea ecx, [ebp - 0x1c]
mov dx, word [0x4099d6]
mov eax, dword [ebp - 0xc]
call fcn.0040424c
cmp dword [ebp - 0x1c], 0
jne 0x4068dc
mov byte [0x40821c], 0
push 0x10
push 0x406f64
push 0x406f84
push 0
call sub.user32.dll_MessageBoxA_1
call fcn.00402c70
jmp 0x406f2d
mov eax, dword [0x408220]
cmp byte [eax], 0
jne 0x406910
mov edx, dword [ebp - 0x1c]
mov eax, 0x406fa0
call fcn.0040353c
test eax, eax
jg 0x406908
mov edx, dword [ebp - 0x1c]
mov eax, 0x406fac
call fcn.0040353c
test eax, eax
jle 0x406910
mov eax, dword [0x408220]
mov byte [eax], 1
push 0
push 0
mov eax, 1
call fcn.00403f84
mov cx, word [0x4099d8]
test cx, cx
jbe 0x40693b
movzx eax, cx
xor edx, edx
push edx
push eax
mov eax, 1
call fcn.00403f84
cmp byte [ebp - 5], 0
je 0x40695f
mov eax, dword [ebp - 0x1c]
call fcn.00403454
push eax
push 0
push 0x180
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406e0d
mov eax, dword [ebp - 0x1c]
call fcn.00403454
mov edx, eax
mov eax, dword [ebp - 0x24]
call fcn.00403e28
test al, al
je 0x406e0d
mov byte [ebp - 0xd], 0
mov ax, word [0x4099c2]
and ax, 1
cmp ax, 1
jne 0x406aec
sub dword [0x4099b0], 0xc
xor eax, eax
push ebp
push 0x406ae0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x18
call fcn.00402458
mov dword [ebp - 0x14], eax
push 0
lea eax, [ebp - 0x34]
push eax
push 0xc
mov ebx, dword [ebp - 0x14]
push ebx
mov eax, dword [0x4099b4]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0xc]
mov eax, ebx
mov ecx, 0xc
call fcn.00402594
xor eax, eax
push ebp
push 0x406acf
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x408264]
cmp dword [eax], 0
je 0x406a1c
mov eax, dword [0x4099ca]
push eax
mov eax, dword [0x4099c6]
push eax
mov eax, dword [0x408264]
mov eax, dword [eax]
push eax
mov cx, word [0x4099c2]
mov dl, 0xc
mov eax, dword [ebp - 0x14]
call fcn.00407218
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x406ab9
xor ebx, ebx
mov byte [0x40821c], 0
push 0x7f00
push 0
call sub.user32.dll_LoadCursorA
push eax
call sub.user32.dll_SetCursor
push 0x4074c8
mov edx, 0x406fb0
xor ecx, ecx
mov eax, dword [0x409650]
call fcn.00403ca4
mov byte [0x40821c], 1
lea ecx, [ebp - 0x54]
mov edx, dword [0x4082b8]
mov dx, word [edx]
mov eax, dword [0x408228]
call fcn.0040424c
mov edx, dword [ebp - 0x54]
mov eax, dword [0x408264]
call fcn.0040316c
mov eax, dword [0x4099ca]
push eax
mov eax, dword [0x4099c6]
push eax
mov eax, dword [0x408264]
mov eax, dword [eax]
push eax
mov cx, word [0x4099c2]
mov dl, 0xc
mov eax, dword [ebp - 0x14]
call fcn.00407218
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x406ab9
inc ebx
cmp bl, 3
jne 0x406a28
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406ad6
mov eax, dword [ebp - 0x14]
call fcn.00402478
ret
mov byte [ebp - 0xd], 1
cmp byte [ebp - 0xd], 0
je 0x406e5a
mov eax, dword [0x4082a0]
call fcn.0040439c
call fcn.00403f70
push eax
mov eax, dword [0x4082a0]
call fcn.004043c0
lea ecx, [ebp - 0x58]
pop edx
call fcn.0040424c
push dword [ebp - 0x58]
push 0x406fa0
push dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.00403314
mov eax, dword [ebp - 0x20]
call fcn.00403454
mov ebx, eax
mov eax, ebx
call fcn.0040415c
test al, al
je 0x406bf4
mov eax, dword [0x40829c]
mov al, byte [eax]
dec al
je 0x406b62
dec al
je 0x406b7f
jmp 0x406c30
mov eax, dword [0x40825c]
mov eax, dword [eax]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406e0d
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x20]
call fcn.004040b8
mov edx, dword [ebp - 0x5c]
mov eax, dword [0x408270]
call fcn.0040316c
mov byte [0x40821c], 0
push 0x7f00
push 0
call sub.user32.dll_LoadCursorA
push eax
call sub.user32.dll_SetCursor
push 0x40732c
mov edx, 0x406fb8
xor ecx, ecx
mov eax, dword [0x409650]
call fcn.00403ca4
mov byte [0x40821c], 1
mov eax, dword [0x408298]
cmp byte [eax], 0
jne 0x406c30
mov eax, dword [0x40825c]
mov eax, dword [eax]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406e0d
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x20]
call fcn.00403ff4
mov eax, dword [ebp - 0x18]
call fcn.004042f4
mov eax, dword [ebp - 0x18]
call fcn.00403454
mov esi, eax
mov eax, esi
call fcn.0040415c
test al, al
jne 0x406c30
push 0x10
push 0x406fc4
push esi
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x406e5a
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push ebx
call sub.kernel32.dll_CreateFileA
mov dword [0x4099b8], eax
cmp dword [0x4099b8], 0xffffffff
je 0x406dcf
xor eax, eax
push ebp
push 0x406dc8
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x406d7a
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x60]
mov ecx, dword [ebp - 0x20]
mov edx, 0x406fe4
call fcn.004032a0
mov eax, dword [ebp - 0x60]
call fcn.00403454
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 - 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
mov dword [0x409970], 0xffffffff
mov eax, dword [0x4099ce]
mov dword [0x4099b0], eax
mov ax, word [0x4099c2]
and ax, 1
cmp ax, 1
jne 0x406cf5
sub dword [0x4099b0], 0xc
mov ax, word [0x4099c4]
sub ax, 1
jb 0x406d09
sub ax, 7
je 0x406d10
jmp 0x406d17
call fcn.00403e60
jmp 0x406d48
call fcn.0040557c
jmp 0x406d48
mov byte [0x40821c], 0
push 0x10
push 0x406f64
push 0x406ff4
push 0
call sub.user32.dll_MessageBoxA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00402c70
call fcn.00402c70
jmp 0x406f2d
mov eax, dword [0x409970]
xor eax, 0xffffffff
cmp eax, dword [0x4099ca]
jne 0x406d70
mov eax, dword [0x40825c]
mov eax, dword [eax]
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 0x406d84
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406e0d
mov edx, dword [0x4099c6]
mov eax, dword [0x4099b8]
call fcn.00403d2c
mov eax, dword [0x4099b8]
push eax
call sub.kernel32.dll_CloseHandle
test eax, eax
jne 0x406dc7
push 0x10
push 0x407010
mov eax, dword [ebp - 0x20]
call fcn.00403454
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 0x406df5
push 0x10
push 0x407028
push ebx
push 0
call sub.user32.dll_MessageBoxA_1
jmp 0x406e0d
mov eax, dword [0x40825c]
mov eax, dword [eax]
push eax
push 0
push 0x185
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
movzx eax, word [0x4099d6]
xor edx, edx
add eax, dword [ebp - 0x30]
adc edx, dword [ebp - 0x2c]
push edx
push eax
movzx eax, word [0x4099d8]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov eax, dword [0x4099ce]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
xor eax, eax
call fcn.00403f84
call fcn.004066a0
test al, al
jne 0x406841
mov byte [0x40821c], 0
cmp byte [ebp - 0xd], 0
je 0x406ee1
cmp byte [ebp - 5], 0
jne 0x406ee1
push 0
push 0
push 0x190
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
jne 0x406eaa
mov eax, dword [0x408260]
cmp byte [eax], 0
jne 0x406ea0
push 0
push 0x40703c
push 0x407048
push 0
call sub.user32.dll_MessageBoxA_1
mov eax, dword [0x4082a8]
mov byte [eax], 1
jmp 0x406f10
push 0x10
push 0x406f64
mov ebx, 0x407068
push ebx
push 0
call sub.user32.dll_MessageBoxA_1
push ebx
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 eax, dword [0x4082a8]
mov byte [eax], 0
jmp 0x406f10
cmp byte [ebp - 5], 0
je 0x406f10
push 0
push 0
push 0x18b
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
test eax, eax
jne 0x406f10
push 0x10
push 0x406f64
push 0x407098
push 0
call sub.user32.dll_MessageBoxA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406f2d
mov eax, dword [ebp - 0xc]
call fcn.00402478
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406f5c
lea eax, [ebp - 0x60]
mov edx, 4
call fcn.0040313c
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.0040313c
ret