Function at 0x405e20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x13
push 0
push 0
dec ecx
jne 0x405e28
push ebx
push esi
push edi
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4068d8
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 6], 0
xor edx, edx
mov eax, dword [0x408234]
call fcn.00405b00
cmp byte [ebp - 5], 2
je 0x405e80
cmp dword [0x409800], 0xffffffff
jne 0x405e80
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x4068ec
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
jmp 0x4068a0
push 0x3ed
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_GetDlgItem
mov dword [ebp - 0x24], eax
mov eax, 0x102
call fcn.00402448
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x406899
push dword fs:[edx]
mov dword fs:[edx], esp
mov dword [0x4097d4], 0xffffffff
mov byte [0x4097d8], 0
xor eax, eax
mov dword [ebp - 0x40], eax
cmp byte [ebp - 5], 1
jne 0x405edf
push 0
push 0
push 0x184
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x4067b5
cmp byte [ebp - 5], 2
jne 0x405ef8
xor eax, eax
mov dword [0x409818], eax
xor eax, eax
mov dword [0x409810], eax
jmp 0x4067b5
xor eax, eax
mov dword [0x409814], eax
push 0
push 0
push 0x402
mov eax, dword [0x40980c]
push eax
call sub.user32.dll_SendMessageA
mov byte [0x4097d1], 2
jmp 0x4067b5
mov eax, dword [0x409800]
mov dword [ebp - 0x28], eax
push 0
lea eax, [ebp - 0x2c]
push eax
movzx eax, word [0x409842]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x4096c8]
push eax
call sub.kernel32.dll_ReadFile
lea ecx, [ebp - 0x1c]
mov dx, word [0x409842]
mov eax, dword [ebp - 0xc]
call fcn.00405b84
cmp dword [ebp - 0x1c], 0
jne 0x405f7c
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406910
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
call fcn.00402c30
jmp 0x4068a0
cmp byte [0x4097d8], 0
jne 0x405fae
mov edx, dword [ebp - 0x1c]
mov eax, 0x406944
call fcn.00405394
test eax, eax
jg 0x405fa7
mov edx, dword [ebp - 0x1c]
mov eax, 0x406950
call fcn.00405394
test eax, eax
jle 0x405fae
mov byte [0x4097d8], 1
cmp byte [ebp - 5], 1
jne 0x405fd7
mov eax, dword [ebp - 0x1c]
call fcn.00403440
call fcn.00405b3c
push eax
push 0
push 0x180
mov eax, dword [ebp - 0x24]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406799
cmp byte [ebp - 5], 2
jne 0x40601e
mov eax, dword [ebp - 0x1c]
call fcn.00403440
call fcn.00405b3c
mov edx, eax
mov eax, dword [ebp - 0x24]
call fcn.004059d0
test al, al
je 0x406799
mov eax, dword [0x40983e]
test eax, eax
jne 0x40600d
inc dword [0x409810]
jmp 0x406013
add dword [0x409810], eax
inc dword [0x409818]
jmp 0x406799
mov eax, dword [ebp - 0x1c]
call fcn.00403440
call fcn.00405b3c
mov edx, eax
mov eax, dword [ebp - 0x24]
call fcn.004059d0
test al, al
je 0x406799
mov byte [ebp - 0xd], 0
mov edx, dword [ebp - 0x1c]
mov eax, 0x406944
call fcn.0040518c
mov ebx, eax
mov eax, dword [ebp - 0x1c]
call fcn.00403240
cmp ebx, eax
jne 0x406077
cmp dword [0x40983a], 0
jne 0x406077
cmp dword [0x40983e], 0
jne 0x406077
mov byte [ebp - 0xd], 1
jmp 0x4061c3
mov ax, word [0x40982e]
and ax, 1
cmp ax, 1
jne 0x4061bf
sub dword [0x409820], 0xc
xor eax, eax
push ebp
push 0x4061b3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x18
call fcn.00402448
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 [0x4096c8]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0xc]
mov eax, ebx
mov ecx, 0xc
call fcn.0040254c
xor eax, eax
push ebp
push 0x4061a2
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x4097f8], 0
je 0x406111
mov eax, dword [0x409832]
push eax
mov eax, dword [0x4097f8]
push eax
mov ecx, dword [0x409836]
mov dx, word [0x40982e]
mov eax, dword [ebp - 0x14]
call fcn.00406b44
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x40618c
xor ebx, ebx
push 0x40743c
mov ecx, dword [0x40822c]
mov edx, 0x67
mov eax, dword [0x409650]
call fcn.00403b6c
cmp eax, 2
je 0x40618c
lea ecx, [ebp - 0x60]
mov eax, 0x4097dc
mov dx, word [0x4097fc]
call fcn.00405b84
mov edx, dword [ebp - 0x60]
mov eax, 0x4097f8
call fcn.0040312c
mov eax, dword [0x409832]
push eax
mov eax, dword [0x4097f8]
push eax
mov ecx, dword [0x409836]
mov dx, word [0x40982e]
mov eax, dword [ebp - 0x14]
call fcn.00406b44
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x40618c
inc ebx
cmp ebx, 0x80000000
jne 0x406119
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4061a9
mov eax, dword [ebp - 0x14]
call fcn.00402468
ret
mov byte [ebp - 0xd], 1
cmp byte [ebp - 0xd], 0
je 0x4067c2
mov eax, 0x4096cc
call fcn.00405d18
call fcn.0040501c
push eax
mov eax, 0x4096cc
call fcn.00405d18
lea ecx, [ebp - 0x64]
pop edx
call fcn.00405b84
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
call fcn.0040328c
lea edx, [ebp - 0x68]
mov eax, dword [ebp - 0x20]
call fcn.00405dd4
mov edx, dword [ebp - 0x68]
lea eax, [ebp - 0x20]
call fcn.00403170
mov eax, dword [ebp - 0x20]
call fcn.00403440
mov edx, eax
lea eax, [ebp - 0x6c]
call fcn.004031f8
mov eax, dword [ebp - 0x6c]
call fcn.00405158
test al, al
je 0x40632d
mov al, byte [0x4097d1]
dec al
je 0x406248
dec al
je 0x40629b
jmp 0x4063a8
mov eax, dword [0x40983e]
add dword [0x409814], eax
inc dword [ebp - 0x40]
push 0
mov eax, dword [0x409814]
mov dword [ebp - 0x74], eax
xor eax, eax
mov dword [ebp - 0x70], eax
fild qword [ebp - 0x74]
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
fdivp st(1)
fmul dword [0x406954]
call fcn.004026d8
push eax
push 0x402
mov eax, dword [0x40980c]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406799
lea edx, [ebp - 0x80]
mov eax, dword [ebp - 0x20]
call fcn.00405264
mov edx, dword [ebp - 0x80]
mov eax, 0x409808
call fcn.0040312c
push 0x4072e0
mov ecx, dword [0x40822c]
mov edx, 0x66
mov eax, dword [0x409650]
call fcn.00403b6c
cmp byte [0x409804], 0
jne 0x4063a8
mov eax, dword [0x40983e]
add dword [0x409814], eax
inc dword [ebp - 0x40]
push 0
mov eax, dword [0x409814]
mov dword [ebp - 0x74], eax
xor eax, eax
mov dword [ebp - 0x70], eax
fild qword [ebp - 0x74]
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
fdivp st(1)
fmul dword [0x406954]
call fcn.004026d8
push eax
push 0x402
mov eax, dword [0x40980c]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406799
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x20]
call fcn.00405210
mov eax, dword [ebp - 0x18]
call fcn.00405c2c
mov eax, dword [ebp - 0x18]
call fcn.00403440
mov edx, eax
lea eax, [ebp - 0x84]
call fcn.004031f8
mov eax, dword [ebp - 0x84]
call fcn.00405168
test al, al
jne 0x4063a8
push 0
mov eax, dword [0x40885c]
push eax
push 0x406960
push dword [ebp - 0x18]
push 0x406960
push 0x40696c
lea eax, [ebp - 0x88]
mov edx, 4
call fcn.00403300
mov eax, dword [ebp - 0x88]
call fcn.00403440
push eax
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
jmp 0x4067c2
mov edx, dword [ebp - 0x1c]
mov eax, 0x406944
call fcn.0040518c
mov ebx, eax
mov eax, dword [ebp - 0x1c]
call fcn.00403240
cmp ebx, eax
jne 0x406462
cmp dword [0x40983a], 0
jne 0x406462
cmp dword [0x40983e], 0
jne 0x406462
mov ebx, dword [0x408230]
test ebx, ebx
je 0x406414
mov eax, dword [ebx + 0x2a]
add eax, dword [0x408234]
cmp eax, dword [ebp - 0x28]
jne 0x40640d
mov eax, dword [ebx + 0x26]
push eax
mov eax, dword [ebp - 0x20]
call fcn.00403440
push eax
call sub.kernel32.dll_SetFileAttributesA
jmp 0x406414
mov ebx, dword [ebx + 0x2e]
test ebx, ebx
jne 0x4063eb
inc dword [ebp - 0x40]
inc dword [0x409814]
push 0
mov eax, dword [0x409814]
mov dword [ebp - 0x74], eax
xor eax, eax
mov dword [ebp - 0x70], eax
fild qword [ebp - 0x74]
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
fdivp st(1)
fmul dword [0x406954]
call fcn.004026d8
push eax
push 0x402
mov eax, dword [0x40980c]
push eax
call sub.user32.dll_SendMessageA
jmp 0x406799
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
mov eax, dword [ebp - 0x20]
call fcn.00403440
push eax
call sub.kernel32.dll_CreateFileA
mov dword [0x409824], eax
cmp dword [0x409824], 0xffffffff
je 0x40670f
xor eax, eax
push ebp
push 0x406705
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4065ab
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x5c]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x5c]
push eax
call sub.user32.dll_DispatchMessageA
mov dword [0x40981c], 0xffffffff
mov eax, dword [0x40983a]
mov dword [0x409820], eax
mov ax, word [0x40982e]
and ax, 1
cmp ax, 1
jne 0x4064ed
sub dword [0x409820], 0xc
mov ax, word [0x409830]
sub ax, 1
jb 0x406501
sub ax, 7
je 0x406508
jmp 0x40650f
call fcn.00405a08
jmp 0x406539
call fcn.00404e6c
jmp 0x406539
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406980
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
push 0
push 0
push 0x402
mov eax, dword [0x40980c]
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [0x40981c]
xor eax, 0xffffffff
cmp eax, dword [0x409836]
jne 0x40655d
inc dword [ebp - 0x40]
cmp dword [0x40983e], 0
jne 0x4065a1
inc dword [0x409814]
jmp 0x4065a1
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406960
push dword [ebp - 0x1c]
push 0x406960
push 0x4069a8
lea eax, [ebp - 0x8c]
mov edx, 4
call fcn.00403300
mov eax, dword [ebp - 0x8c]
call fcn.00403440
call fcn.00405b3c
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 0x4065f9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406799
lea eax, [ebp - 0x3c]
push eax
mov ax, word [0x409832]
push eax
mov eax, dword [0x409832]
call fcn.00403b50
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 [0x409824]
push eax
call sub.kernel32.dll_SetFileTime
mov eax, dword [0x409824]
push eax
call sub.kernel32.dll_CloseHandle
test eax, eax
jne 0x406691
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406960
push dword [ebp - 0x20]
push 0x406960
push 0x4069f4
lea eax, [ebp - 0x94]
mov edx, 4
call fcn.00403300
mov eax, dword [ebp - 0x94]
call fcn.00403440
push eax
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
mov ebx, dword [0x408230]
test ebx, ebx
je 0x4066c4
mov eax, dword [ebx + 0x2a]
add eax, dword [0x408234]
cmp eax, dword [ebp - 0x28]
jne 0x4066bd
mov eax, dword [ebx + 0x26]
push eax
mov eax, dword [ebp - 0x20]
call fcn.00403440
push eax
call sub.kernel32.dll_SetFileAttributesA
jmp 0x4066c4
mov ebx, dword [ebx + 0x2e]
test ebx, ebx
jne 0x40669b
push 0
mov eax, dword [0x409814]
mov dword [ebp - 0x74], eax
xor eax, eax
mov dword [ebp - 0x70], eax
fild qword [ebp - 0x74]
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
fdivp st(1)
fmul dword [0x406954]
call fcn.004026d8
push eax
push 0x402
mov eax, dword [0x40980c]
push eax
call sub.user32.dll_SendMessageA
ret
push 0x30
mov eax, dword [0x40885c]
push eax
push 0x406960
push dword [ebp - 0x20]
push 0x406960
push 0x40696c
lea eax, [ebp - 0x98]
mov edx, 4
call fcn.00403300
mov eax, dword [ebp - 0x98]
call fcn.00403440
push eax
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_MessageBoxA_1
mov eax, dword [0x40983e]
add dword [0x409814], eax
push 0
mov eax, dword [0x409814]
mov dword [ebp - 0x74], eax
xor eax, eax
mov dword [ebp - 0x70], eax
fild qword [ebp - 0x74]
mov eax, dword [0x409810]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x78], eax
fild qword [ebp - 0x7c]
fdivp st(1)
fmul dword [0x406954]
call fcn.004026d8
push eax
push 0x402
mov eax, dword [0x40980c]
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [ebp - 0x28]
add eax, 0x1e
movzx edx, word [0x409842]
add eax, edx
add eax, dword [0x40983a]
xor edx, edx
call fcn.00405b00
call fcn.00405d50
test al, al
jne 0x405f1f
cmp dword [0x409828], 0x2014b50
jne 0x40686f
cmp dword [0x408230], 0
jne 0x40686f
mov eax, dword [0x409800]
mov dword [ebp - 0x28], eax
xor edx, edx
mov eax, dword [ebp - 0x28]
call fcn.00405b00
xor ebx, ebx
mov esi, ebx
mov eax, 0x32
call fcn.00402448
mov ebx, eax
push 0
lea eax, [ebp - 0x2c]
push eax
push 0x32
push ebx
mov eax, dword [0x4096c8]
push eax
call sub.kernel32.dll_ReadFile
xor eax, eax
mov dword [ebx + 0x2e], eax
cmp dword [ebx], 0x2014b50
jne 0x40683a
cmp dword [0x408230], 0
jne 0x406831
mov dword [0x408230], ebx
test esi, esi
je 0x406843
mov dword [esi + 0x2e], ebx
jmp 0x406843
mov eax, ebx
call fcn.00402468
jmp 0x40686f
mov eax, dword [0x409800]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
add eax, 0x32
sub eax, 4
movzx edx, word [ebx + 0x1c]
add eax, edx
movzx edx, word [ebx + 0x1e]
add eax, edx
movzx edx, word [ebx + 0x20]
add eax, edx
xor edx, edx
call fcn.00405b00
jmp 0x4067f3
cmp byte [ebp - 5], 0
jne 0x406883
mov eax, dword [0x409818]
cmp eax, dword [ebp - 0x40]
jne 0x406883
mov byte [ebp - 6], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4068a0
mov eax, dword [ebp - 0xc]
call fcn.00402468
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4068df
lea eax, [ebp - 0x98]
mov edx, 7
call fcn.004030fc
lea eax, [ebp - 0x6c]
mov edx, 4
call fcn.004030fc
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.004030fc
ret