Function at 0x406304
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x14
push 0
push 0
dec ecx
jne 0x40630c
push ebx
push esi
push edi
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x406e2d
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 6], 0
xor edx, edx
mov eax, dword [0x408234]
call fcn.00405fd4
cmp byte [ebp - 5], 2
je 0x406364
cmp dword [0x4097fc], 0xffffffff
jne 0x406364
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406e40
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
jmp 0x406df5
push 0x3ed
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
mov dword [ebp - 0x24], eax
mov eax, 0x102
call fcn.004027b4
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x406dee
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [0x4097d0], 0xffffffff
mov byte [0x4097d4], 0
xor eax, eax
mov dword [ebp - 0x48], eax
cmp byte [ebp - 5], 1
jne 0x4063c3
push 0
push 0
push 0x184
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406ce2
cmp byte [ebp - 5], 2
jne 0x4063dc
xor eax, eax
mov dword [0x409814], eax
xor eax, eax
mov dword [0x40980c], eax
jmp 0x406ce2
xor eax, eax
mov dword [0x409810], eax
push 0
push 0
push 0x402
mov eax, dword [0x409808]
push eax
call sub.user32.dll_SendMessageA
mov byte [0x4097cd], 2
jmp 0x406ce2
mov eax, dword [0x4097fc]
mov dword [ebp - 0x28], eax
push 0
lea eax, [ebp - 0x2c]
push eax
movzx eax, word [0x40983e]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x4096c4]
push eax
call sub.kernel32.dll_ReadFile
lea ecx, [ebp - 0x1c]
mov dx, word [0x40983e]
mov eax, dword [ebp - 0xc]
call fcn.00406060
cmp dword [ebp - 0x1c], 0
jne 0x406460
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406e64
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
call fcn.00403028
jmp 0x406df5
cmp byte [0x4097d4], 0
jne 0x406492
mov edx, dword [ebp - 0x1c]
mov eax, 0x406e98
call fcn.00405840
test eax, eax
jg 0x40648b
mov edx, dword [ebp - 0x1c]
mov eax, 0x406ea4
call fcn.00405840
test eax, eax
jle 0x406492
mov byte [0x4097d4], 1
cmp byte [ebp - 5], 1
jne 0x4064bb
mov eax, dword [ebp - 0x1c]
call fcn.00403860
call fcn.00406010
push eax
push 0
push 0x180
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406cc6
cmp byte [ebp - 5], 2
jne 0x406503
mov eax, dword [ebp - 0x1c]
call fcn.00403860
call fcn.00406010
mov edx, eax
mov eax, dword [ebp - 0x24]
call fcn.00405ea4
test al, al
je 0x406cc6
mov esi, dword [0x40983a]
test esi, esi
jne 0x4064f2
inc dword [0x40980c]
jmp 0x4064f8
add dword [0x40980c], esi
inc dword [0x409814]
jmp 0x406cc6
mov eax, dword [ebp - 0x1c]
call fcn.00403860
call fcn.00406010
mov edx, eax
mov eax, dword [ebp - 0x24]
call fcn.00405ea4
test al, al
je 0x406cc6
mov byte [ebp - 0xd], 0
mov edx, dword [ebp - 0x1c]
mov eax, 0x406e98
call fcn.00405638
mov ebx, eax
mov eax, dword [ebp - 0x1c]
call fcn.00403660
cmp ebx, eax
jne 0x40655c
cmp dword [0x409836], 0
jne 0x40655c
cmp dword [0x40983a], 0
jne 0x40655c
mov byte [ebp - 0xd], 1
jmp 0x4066a8
mov ax, word [0x40982a]
and ax, 1
cmp ax, 1
jne 0x4066a4
sub dword [0x40981c], 0xc
xor eax, eax
push ebp
push 0x406698
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x18
call fcn.004027b4
mov dword [ebp - 0x14], eax
push 0
lea eax, [ebp - 0x2c]
push eax
push 0xc
mov edi, dword [ebp - 0x14]
push edi
mov eax, dword [0x4096c4]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0xc]
mov eax, edi
mov ecx, 0xc
call fcn.004028c8
xor eax, eax
push ebp
push 0x406687
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x4097f4], 0
je 0x4065f6
mov eax, dword [0x40982e]
push eax
mov eax, dword [0x4097f4]
push eax
mov ecx, dword [0x409832]
mov dx, word [0x40982a]
mov eax, dword [ebp - 0x14]
call fcn.00407098
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x406671
xor ebx, ebx
push 0x407960
mov ecx, dword [0x40822c]
mov edx, 0x67
mov eax, dword [0x409650]
call fcn.00403fb0
cmp eax, 2
je 0x406671
lea ecx, [ebp - 0x68]
mov eax, 0x4097d8
mov dx, word [0x4097f8]
call fcn.00406060
mov edx, dword [ebp - 0x68]
mov eax, 0x4097f4
call fcn.0040354c
mov eax, dword [0x40982e]
push eax
mov eax, dword [0x4097f4]
push eax
mov ecx, dword [0x409832]
mov dx, word [0x40982a]
mov eax, dword [ebp - 0x14]
call fcn.00407098
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x406671
inc ebx
cmp ebx, 0x80000000
jne 0x4065fe
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40668e
mov eax, dword [ebp - 0x14]
call fcn.004027e4
ret
mov byte [ebp - 0xd], 1
cmp byte [ebp - 0xd], 0
je 0x406cef
mov eax, 0x4096c8
call fcn.004061f4
call fcn.004054b4
push eax
mov eax, 0x4096c8
call fcn.004061f4
lea ecx, [ebp - 0x6c]
pop edx
call fcn.00406060
mov edx, dword [ebp - 0x6c]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
call fcn.004036ac
lea edx, [ebp - 0x70]
mov eax, dword [ebp - 0x20]
call fcn.004062b8
mov edx, dword [ebp - 0x70]
lea eax, [ebp - 0x20]
call fcn.00403590
mov eax, dword [ebp - 0x20]
call fcn.00403860
mov edx, eax
lea eax, [ebp - 0x74]
call fcn.00403618
mov eax, dword [ebp - 0x74]
call fcn.00405604
test al, al
je 0x406824
mov al, byte [0x4097cd]
dec al
je 0x40672d
dec al
je 0x406786
jmp 0x40689f
mov eax, dword [0x40983a]
add dword [0x409810], eax
inc dword [ebp - 0x48]
push 0
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
mov eax, dword [0x40980c]
mov dword [ebp - 0x84], eax
xor eax, eax
mov dword [ebp - 0x80], eax
fild qword [ebp - 0x84]
fdivp st(1)
fmul dword [0x406ea8]
call fcn.00402ad0
push eax
push 0x402
mov eax, dword [0x409808]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406cc6
lea edx, [ebp - 0x88]
mov eax, dword [ebp - 0x20]
call fcn.00405710
mov edx, dword [ebp - 0x88]
mov eax, 0x409804
call fcn.0040354c
push 0x407804
mov ecx, dword [0x40822c]
mov edx, 0x66
mov eax, dword [0x409650]
call fcn.00403fb0
cmp byte [0x409800], 0
jne 0x40689f
mov eax, dword [0x40983a]
add dword [0x409810], eax
inc dword [ebp - 0x48]
push 0
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
mov eax, dword [0x40980c]
mov dword [ebp - 0x84], eax
xor eax, eax
mov dword [ebp - 0x80], eax
fild qword [ebp - 0x84]
fdivp st(1)
fmul dword [0x406ea8]
call fcn.00402ad0
push eax
push 0x402
mov eax, dword [0x409808]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406cc6
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x20]
call fcn.004056bc
mov eax, dword [ebp - 0x18]
call fcn.00406108
mov eax, dword [ebp - 0x18]
call fcn.00403860
mov edx, eax
lea eax, [ebp - 0x8c]
call fcn.00403618
mov eax, dword [ebp - 0x8c]
call fcn.00405614
test al, al
jne 0x40689f
push 0
mov eax, dword [0x40885c]
push eax
push 0x406eb4
push dword [ebp - 0x18]
push 0x406eb4
push 0x406ec0
lea eax, [ebp - 0x90]
mov edx, 4
call fcn.00403720
mov eax, dword [ebp - 0x90]
call fcn.00403860
push eax
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
jmp 0x406cef
mov edx, dword [ebp - 0x1c]
mov eax, 0x406e98
call fcn.00405638
mov ebx, eax
mov eax, dword [ebp - 0x1c]
call fcn.00403660
cmp ebx, eax
jne 0x406971
cmp dword [0x409836], 0
jne 0x406971
cmp dword [0x40983a], 0
jne 0x406971
mov eax, dword [0x408230]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x40691d
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 0x2a]
add eax, dword [0x408234]
cmp eax, dword [ebp - 0x28]
jne 0x40690e
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 0x26]
push eax
mov eax, dword [ebp - 0x20]
call fcn.00403860
push eax
call sub.kernel32.dll_SetFileAttributesA
jmp 0x40691d
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 0x2e]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x4068e6
inc dword [ebp - 0x48]
inc dword [0x409810]
push 0
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
mov eax, dword [0x40980c]
mov dword [ebp - 0x84], eax
xor eax, eax
mov dword [ebp - 0x80], eax
fild qword [ebp - 0x84]
fdivp st(1)
fmul dword [0x406ea8]
call fcn.00402ad0
push eax
push 0x402
mov eax, dword [0x409808]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406cc6
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
mov eax, dword [ebp - 0x20]
call fcn.00403860
push eax
call sub.kernel32.dll_CreateFileA
mov dword [0x409820], eax
cmp dword [0x409820], 0xffffffff
je 0x406c36
xor eax, eax
push ebp
push 0x406c2c
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x406aba
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x64]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x64]
push eax
call sub.user32.dll_DispatchMessageA
mov dword [0x409818], 0xffffffff
mov eax, dword [0x409836]
mov dword [0x40981c], eax
mov ax, word [0x40982a]
and ax, 1
cmp ax, 1
jne 0x4069fc
sub dword [0x40981c], 0xc
mov ax, word [0x40982c]
sub ax, 1
jb 0x406a10
sub ax, 7
je 0x406a17
jmp 0x406a1e
call fcn.00405edc
jmp 0x406a48
call fcn.00405304
jmp 0x406a48
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406ed4
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
push 0
push 0
push 0x402
mov eax, dword [0x409808]
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [0x409818]
xor eax, 0xffffffff
cmp eax, dword [0x409832]
jne 0x406a6c
inc dword [ebp - 0x48]
cmp dword [0x40983a], 0
jne 0x406ab0
inc dword [0x409810]
jmp 0x406ab0
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406eb4
push dword [ebp - 0x1c]
push 0x406eb4
push 0x406efc
lea eax, [ebp - 0x94]
mov edx, 4
call fcn.00403720
mov eax, dword [ebp - 0x94]
call fcn.00403860
call fcn.00406010
push eax
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x406b08
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406cc6
lea eax, [ebp - 0x3c]
push eax
mov ax, word [0x40982e]
push eax
mov eax, dword [0x40982e]
call fcn.00403f94
push eax
call sub.kernel32.dll_DosDateTimeToFileTime
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x3c]
push eax
call sub.kernel32.dll_LocalFileTimeToFileTime
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x34]
push eax
push 0
mov eax, dword [0x409820]
push eax
call sub.kernel32.dll_SetFileTime
mov eax, dword [0x409820]
push eax
call sub.kernel32.dll_CloseHandle
test eax, eax
jne 0x406ba0
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406eb4
push dword [ebp - 0x20]
push 0x406eb4
push 0x406f48
lea eax, [ebp - 0x9c]
mov edx, 4
call fcn.00403720
mov eax, dword [ebp - 0x9c]
call fcn.00403860
push eax
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
mov eax, dword [0x408230]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x406be5
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 0x2a]
add eax, dword [0x408234]
cmp eax, dword [ebp - 0x28]
jne 0x406bd6
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 0x26]
push eax
mov eax, dword [ebp - 0x20]
call fcn.00403860
push eax
call sub.kernel32.dll_SetFileAttributesA
jmp 0x406be5
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 0x2e]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x406bae
push 0
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
mov eax, dword [0x40980c]
mov dword [ebp - 0x84], eax
xor eax, eax
mov dword [ebp - 0x80], eax
fild qword [ebp - 0x84]
fdivp st(1)
fmul dword [0x406ea8]
call fcn.00402ad0
push eax
push 0x402
mov eax, dword [0x409808]
push eax
call sub.user32.dll_SendMessageA
ret
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406eb4
push dword [ebp - 0x20]
push 0x406eb4
push 0x406ec0
lea eax, [ebp - 0xa0]
mov edx, 4
call fcn.00403720
mov eax, dword [ebp - 0xa0]
call fcn.00403860
push eax
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
mov eax, dword [0x40983a]
add dword [0x409810], eax
push 0
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
mov eax, dword [0x40980c]
mov dword [ebp - 0x84], eax
xor eax, eax
mov dword [ebp - 0x80], eax
fild qword [ebp - 0x84]
fdivp st(1)
fmul dword [0x406ea8]
call fcn.00402ad0
push eax
push 0x402
mov eax, dword [0x409808]
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [ebp - 0x28]
add eax, 0x1e
movzx edx, word [0x40983e]
add eax, edx
add eax, dword [0x409836]
xor edx, edx
call fcn.00405fd4
call fcn.00406234
test al, al
jne 0x406403
cmp dword [0x409824], 0x2014b50
jne 0x406dc4
cmp dword [0x408230], 0
jne 0x406dc4
mov eax, dword [0x4097fc]
mov dword [ebp - 0x28], eax
xor edx, edx
mov eax, dword [ebp - 0x28]
call fcn.00405fd4
xor eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
mov eax, 0x32
call fcn.004027b4
mov dword [ebp - 0x40], eax
push 0
lea eax, [ebp - 0x2c]
push eax
push 0x32
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [0x4096c4]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x40]
xor edx, edx
mov dword [eax + 0x2e], edx
mov eax, dword [ebp - 0x40]
cmp dword [eax], 0x2014b50
jne 0x406d82
cmp dword [0x408230], 0
jne 0x406d71
mov eax, dword [ebp - 0x40]
mov dword [0x408230], eax
cmp dword [ebp - 0x44], 0
je 0x406d8c
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x40]
mov dword [eax + 0x2e], edx
jmp 0x406d8c
mov eax, dword [ebp - 0x40]
call fcn.004027e4
jmp 0x406dc4
mov eax, dword [0x4097fc]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
add eax, 0x32
sub eax, 4
mov edx, dword [ebp - 0x40]
movzx edx, word [edx + 0x1c]
add eax, edx
mov edx, dword [ebp - 0x40]
movzx edx, word [edx + 0x1e]
add eax, edx
mov edx, dword [ebp - 0x40]
movzx edx, word [edx + 0x20]
add eax, edx
xor edx, edx
call fcn.00405fd4
jmp 0x406d23
cmp byte [ebp - 5], 0
jne 0x406dd8
mov eax, dword [0x409814]
cmp eax, dword [ebp - 0x48]
jne 0x406dd8
mov byte [ebp - 6], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406df5
mov eax, dword [ebp - 0xc]
call fcn.004027e4
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406e34
lea eax, [ebp - 0xa0]
mov edx, 7
call fcn.0040351c
lea eax, [ebp - 0x74]
mov edx, 4
call fcn.0040351c
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.0040351c
ret