Function at 0x409192
Capabilities:
Check if file exists
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
push esi
push edi
mov edi, ecx
xor eax, eax
mov dword [ebp - 0x14], edi
mov ecx, dword [edi + 0xe0]
mov dword [ebp - 0x58], eax
cmp ecx, eax
mov dword [ebp - 0x54], eax
je 0x4091bd
mov eax, dword [edi + 0xe4]
sub eax, ecx
sar eax, 4
mov ecx, eax
dec eax
test ecx, ecx
je 0x4091e7
mov edx, dword [edi + 0xe0]
mov ecx, eax
shl ecx, 4
lea esi, [eax + 1]
lea ecx, [edx + ecx + 8]
mov eax, dword [ecx]
cdq
add dword [ebp - 0x58], eax
adc dword [ebp - 0x54], edx
dec esi
sub ecx, 0x10
test esi, esi
ja 0x4091d6
push 0x3fa
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
xor ebx, ebx
push 0x640000
push ebx
push 0x401
push eax
mov dword [ebp - 0x2c], eax
call esi
push ebx
push ebx
push 0x402
push dword [ebp - 0x2c]
call esi
push 0x429444
push 0x3fc
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
and dword [ebp - 0x20], 0
and dword [ebp - 0x34], 0
mov dword [ebp - 8], ebx
mov ebx, 0x80000
push str.SOURCE_DIR
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x44], ebx
call fcn.0040168c
lea esi, [edi + 0x30]
lea eax, [ebp - 0x28]
push eax
mov ecx, esi
call fcn.0040f10f
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x3c], eax
call fcn.0040178c
push str.TARGET_DIR
lea ecx, [ebp - 0x28]
call fcn.0040168c
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.0040f10f
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x38], eax
call fcn.0040178c
push ebx
call fcn.00414e25
test eax, eax
pop ecx
mov dword [ebp - 0x1c], eax
jne 0x4092a9
push str.Failed_to_allocate_memory_buffer._Please_free_more_memory.
lea ecx, [ebp - 8]
call fcn.00407845
jmp 0x409a64
and dword [ebp - 0x24], 0
and dword [ebp - 0x28], 0
mov eax, dword [edi + 0xe0]
test eax, eax
je 0x409b10
mov ecx, dword [edi + 0xe4]
sub ecx, eax
sar ecx, 4
cmp dword [ebp - 0x24], ecx
jae 0x409b10
mov ecx, dword [ebp - 0x3c]
mov ebx, eax
add ebx, dword [ebp - 0x28]
lea eax, [ebp - 0xc]
push ebx
push eax
mov dword [ebp - 0x50], ebx
call fcn.00409069
and dword [ebp - 4], 0
lea esi, [ebx + 4]
mov ecx, esi
call fcn.0040917d
test eax, eax
je 0x40932e
push 1
mov ecx, esi
call fcn.00409c23
cmp byte [eax], 0x3a
jne 0x40932e
push 2
mov ecx, esi
call fcn.00409c23
cmp byte [eax], 0x5c
jne 0x40932e
mov eax, dword [esi]
test eax, eax
je 0x40931f
inc dword [eax + 4]
mov esi, dword [esi]
lea ecx, [ebp - 4]
call fcn.0040178c
mov dword [ebp - 4], esi
jmp 0x409359
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x40]
push esi
push eax
call fcn.00409069
mov ecx, dword [eax]
test ecx, ecx
je 0x409344
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 4]
call fcn.0040178c
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], esi
call fcn.0040178c
mov eax, dword [ebx]
xor esi, esi
cmp eax, esi
jne 0x409365
mov eax, ebx
jmp 0x409368
add eax, 0xd
push eax
push 0x411
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
mov eax, dword [ebp - 4]
cmp eax, esi
jne 0x409383
lea eax, [ebp - 4]
jmp 0x409386
add eax, 0xd
push eax
mov ecx, edi
call fcn.00408bc3
test al, al
je 0x409687
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x68], esi
cmp eax, esi
mov dword [ebp - 0x64], 0x8000
mov dword [ebp - 0x6c], 0x4264c0
jne 0x4093b3
lea eax, [ebp - 0xc]
jmp 0x4093b6
add eax, 0xd
push 1
push eax
lea ecx, [ebp - 0x6c]
call fcn.0040774e
test al, al
jne 0x4093e5
mov eax, dword [ebx]
cmp eax, esi
jne 0x4093cf
mov eax, ebx
jmp 0x4093d2
add eax, 0xd
push 1
push eax
lea ecx, [ebp - 0x6c]
call fcn.0040774e
test al, al
je 0x4097a3
mov eax, dword [ebp - 4]
cmp eax, esi
jne 0x4093f1
lea eax, [ebp - 4]
jmp 0x4093f4
add eax, 0xd
push esi
push 0x8000080
push 2
push esi
push esi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x40985d
test byte [ebx + 0xc], 1
jne 0x40943c
mov eax, dword [ebp - 4]
cmp eax, esi
jne 0x409428
lea eax, [ebp - 4]
jmp 0x40942b
add eax, 0xd
push eax
push 0x1100
lea ecx, [edi + 0x104]
call fcn.0041024d
mov eax, dword [ebx + 8]
mov dword [ebp - 0x18], esi
cmp eax, esi
jle 0x4095d4
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
cmp eax, 0x80000
lea eax, [ebp - 0x44]
jg 0x40945d
lea eax, [ebp - 0x48]
mov ebx, dword [eax]
push 1
push dword [ebp + 8]
mov ecx, edi
call fcn.00408ec9
cmp dword [edi + 0xf8], 4
je 0x40991d
cmp byte [edi + 0xc8], 0
jne 0x409556
push ebx
lea ecx, [ebp - 0x6c]
push dword [ebp - 0x1c]
call fcn.00401647
cmp eax, ebx
mov dword [ebp - 0x30], eax
jne 0x409933
lea eax, [ebp - 0x30]
push 0
push eax
push ebx
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4094bc
cmp dword [ebp - 0x30], ebx
je 0x409556
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
jne 0x4099fc
mov eax, dword [ebp - 0x14]
push 0x37
lea esi, [eax + 0xd4]
mov ecx, esi
call fcn.00420040
test al, al
push 0x35
mov ecx, esi
jne 0x409516
call fcn.0041ff60
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
je 0x4094f5
lea edi, [ecx + 0xd]
push 0x37
mov ecx, esi
call fcn.0041ff60
mov ecx, dword [eax]
test ecx, ecx
je 0x409507
lea eax, [ecx + 0xd]
push 1
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x409545
call fcn.0041ff60
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
je 0x409526
lea edi, [ecx + 0xd]
push 0x37
mov ecx, esi
call fcn.0041ff60
mov ecx, dword [eax]
test ecx, ecx
je 0x409538
lea eax, [ecx + 0xd]
push 1
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 1
jne 0x4099fc
mov edi, dword [ebp - 0x14]
jmp 0x40949c
add dword [ebp - 0x20], ebx
add dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x20]
push 0
cdq
push 0x64
push edx
push eax
call fcn.004150f0
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push edx
push eax
call fcn.00415040
mov esi, eax
cmp esi, dword [ebp - 0x34]
je 0x4095c5
push 0
push esi
push 0x402
push dword [ebp - 0x2c]
call dword [sym.imp.USER32.dll_SendMessageA]
push esi
lea eax, [ebp - 0x4c]
push str._i__
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x4095ab
lea eax, [ecx + 0xd]
push eax
push 0x3fc
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
lea ecx, [ebp - 0x4c]
call fcn.0040178c
mov dword [ebp - 0x34], esi
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 8]
cmp dword [ebp - 0x18], eax
jl 0x40944a
lea ecx, [ebp - 0x6c]
call fcn.0040d7ae
mov edx, dword [eax]
lea ecx, [ebp - 0x60]
push ecx
mov ecx, eax
call dword [edx + 0x14]
test al, al
je 0x409a31
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
setne al
test al, al
je 0x409a31
lea ecx, [ebp - 0x6c]
call fcn.00407f8e
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x40962e
lea eax, [ebp - 0xc]
jmp 0x409631
add eax, 0xd
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40965c
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x409649
lea ecx, [ebp - 4]
jmp 0x40964c
add ecx, 0xd
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x409a38
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x6c], 0x4264c0
call fcn.00407f8e
lea ecx, [ebp - 4]
call fcn.0040178c
lea ecx, [ebp - 0xc]
call fcn.0040178c
inc dword [ebp - 0x24]
add dword [ebp - 0x28], 0x10
jmp 0x4092b1
mov eax, dword [ebp - 4]
cmp eax, esi
mov dword [ebp - 0x10], eax
je 0x409694
inc dword [eax + 4]
lea ecx, [ebp - 0x10]
call fcn.0040917d
mov esi, eax
mov eax, esi
dec esi
test eax, eax
je 0x4096e1
cmp dword [ebp - 0x10], 0
jne 0x4096b0
lea eax, [ebp - 0x10]
jmp 0x4096bf
lea ecx, [ebp - 0x10]
call fcn.00408ccd
mov eax, dword [ebp - 0x10]
lea eax, [esi + eax + 0xd]
cmp byte [eax], 0x5c
jne 0x40969e
cmp dword [ebp - 0x10], 0
jne 0x4096cf
lea eax, [ebp - 0x10]
jmp 0x4096de
lea ecx, [ebp - 0x10]
call fcn.00408ccd
mov eax, dword [ebp - 0x10]
lea eax, [esi + eax + 0xd]
and byte [eax], 0
lea esi, [edi + 0xd4]
push 0x33
mov ecx, esi
call fcn.00420040
test al, al
mov eax, dword [ebp - 0x10]
jne 0x40973c
test eax, eax
lea edi, [ebp - 0x10]
je 0x409701
lea edi, [eax + 0xd]
push 0x33
mov ecx, esi
call fcn.0041ff60
mov ecx, dword [eax]
test ecx, ecx
je 0x409713
lea eax, [ecx + 0xd]
push edi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x40972a
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 8]
call fcn.0040178c
mov dword [ebp - 8], esi
lea ecx, [ebp - 0x50]
jmp 0x409791
test eax, eax
lea edi, [ebp - 0x10]
je 0x409746
lea edi, [eax + 0xd]
push 0x33
mov ecx, esi
call fcn.0041ff60
mov edx, eax
lea ecx, [ebp - 0x4c]
call fcn.0040ae7a
mov ecx, dword [eax]
test ecx, ecx
je 0x409762
lea eax, [ecx + 0xd]
push edi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x409779
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 8]
call fcn.0040178c
lea ecx, [ebp - 0x50]
mov dword [ebp - 8], esi
call fcn.0040178c
lea ecx, [ebp - 0x4c]
call fcn.0040178c
lea ecx, [ebp - 0x10]
call fcn.0040178c
jmp 0x409a1c
lea esi, [edi + 0xd4]
push 0x32
mov ecx, esi
call fcn.00420040
test al, al
mov eax, dword [ebp - 0xc]
jne 0x4097fe
test eax, eax
lea edi, [ebp - 0xc]
je 0x4097c3
lea edi, [eax + 0xd]
push 0x32
mov ecx, esi
call fcn.0041ff60
mov ecx, dword [eax]
test ecx, ecx
je 0x4097d5
lea eax, [ecx + 0xd]
push edi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x4097ec
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 8]
call fcn.0040178c
mov dword [ebp - 8], esi
lea ecx, [ebp - 0x50]
jmp 0x409853
test eax, eax
lea edi, [ebp - 0xc]
je 0x409808
lea edi, [eax + 0xd]
push 0x32
mov ecx, esi
call fcn.0041ff60
mov edx, eax
lea ecx, [ebp - 0x4c]
call fcn.0040ae7a
mov ecx, dword [eax]
test ecx, ecx
je 0x409824
lea eax, [ecx + 0xd]
push edi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x40983b
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 8]
call fcn.0040178c
lea ecx, [ebp - 0x50]
mov dword [ebp - 8], esi
call fcn.0040178c
lea ecx, [ebp - 0x4c]
call fcn.0040178c
jmp 0x409a0d
lea ecx, [ebp - 0x6c]
call fcn.00407f8e
mov eax, dword [ebp - 0x14]
push 0x32
lea edi, [eax + 0xd4]
mov ecx, edi
call fcn.00420040
test al, al
mov eax, dword [ebp - 4]
jne 0x4098c3
test eax, eax
lea esi, [ebp - 4]
je 0x409888
lea esi, [eax + 0xd]
push 0x38
mov ecx, edi
call fcn.0041ff60
mov ecx, dword [eax]
test ecx, ecx
je 0x40989a
lea eax, [ecx + 0xd]
push esi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x4098b1
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 8]
call fcn.0040178c
mov dword [ebp - 8], esi
lea ecx, [ebp - 0x50]
jmp 0x409853
test eax, eax
lea esi, [ebp - 4]
je 0x4098cd
lea esi, [eax + 0xd]
push 0x38
mov ecx, edi
call fcn.0041ff60
mov edx, eax
lea ecx, [ebp - 0x4c]
call fcn.0040ae7a
mov ecx, dword [eax]
test ecx, ecx
je 0x4098e9
lea eax, [ecx + 0xd]
push esi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x409900
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 8]
call fcn.0040178c
lea ecx, [ebp - 0x50]
mov dword [ebp - 8], esi
call fcn.0040178c
lea ecx, [ebp - 0x4c]
jmp 0x409853
lea ecx, [ebp - 0x6c]
call fcn.00407f8e
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x409a45
lea ecx, [ebp - 0x6c]
call fcn.00407f8e
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [edi + 0xd4]
push 0x34
mov ecx, esi
call fcn.00420040
test al, al
mov eax, dword [ebp - 0xc]
jne 0x4099a2
test eax, eax
lea edi, [ebp - 0xc]
je 0x409964
lea edi, [eax + 0xd]
push 0x34
mov ecx, esi
call fcn.0041ff60
mov ecx, dword [eax]
test ecx, ecx
je 0x409976
lea eax, [ecx + 0xd]
push edi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x40998d
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 8]
call fcn.0040178c
mov dword [ebp - 8], esi
lea ecx, [ebp - 0x50]
jmp 0x409853
test eax, eax
lea edi, [ebp - 0xc]
je 0x4099ac
lea edi, [eax + 0xd]
push 0x34
mov ecx, esi
call fcn.0041ff60
mov edx, eax
lea ecx, [ebp - 0x4c]
call fcn.0040ae7a
mov ecx, dword [eax]
test ecx, ecx
je 0x4099c8
lea eax, [ecx + 0xd]
push edi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00407807
mov ecx, dword [eax]
add esp, 0xc
test ecx, ecx
je 0x4099df
inc dword [ecx + 4]
mov esi, dword [eax]
lea ecx, [ebp - 8]
call fcn.0040178c
lea ecx, [ebp - 0x50]
mov dword [ebp - 8], esi
call fcn.0040178c
lea ecx, [ebp - 0x4c]
jmp 0x409853
lea ecx, [ebp - 0x6c]
call fcn.00407f8e
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x6c], 0x4264c0
call fcn.00407f8e
lea ecx, [ebp - 4]
call fcn.0040178c
lea ecx, [ebp - 0xc]
call fcn.0040178c
mov edi, dword [ebp - 0x14]
jmp 0x409a64
push str.Failed_to_set_file_time.
jmp 0x409a3d
push str.Failed_to_set_file_attributes.
lea ecx, [ebp - 8]
call fcn.00407845
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x6c], 0x4264c0
call fcn.00407f8e
lea ecx, [ebp - 4]
call fcn.0040178c
lea ecx, [ebp - 0xc]
call fcn.0040178c
push dword [ebp - 0x1c]
call fcn.004148d0
pop ecx
mov dword [edi + 0xf8], 4
lea ecx, [ebp - 8]
call fcn.0040917d
test eax, eax
je 0x409b09
mov eax, dword [ebp - 0x14]
mov esi, 0x123
push esi
lea edi, [eax + 0xd4]
mov ecx, edi
call fcn.00420040
test al, al
push esi
mov ecx, edi
jne 0x409ad0
call fcn.0041ff60
mov ecx, dword [eax]
test ecx, ecx
je 0x409ab2
lea eax, [ecx + 0xd]
mov ecx, dword [ebp - 8]
test ecx, ecx
jne 0x409abe
lea ecx, [ebp - 8]
jmp 0x409ac1
add ecx, 0xd
push 0
push eax
push ecx
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x409b09
call fcn.0041ff60
mov ecx, dword [eax]
mov esi, eax
test ecx, ecx
je 0x409ae0
lea esi, [ecx + 0xd]
lea edx, [ebp - 8]
lea ecx, [ebp - 0x50]
call fcn.0040adfa
mov ecx, dword [eax]
test ecx, ecx
je 0x409af4
lea eax, [ecx + 0xd]
push 0
push esi
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [ebp - 0x50]
call fcn.0040178c
xor bl, bl
jmp 0x409c12
xor edi, edi
push edi
push 0x64
push 0x402
push dword [ebp - 0x2c]
call dword [sym.imp.USER32.dll_SendMessageA]
push str.100_
push 0x3fc
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push dword [ebp - 0x1c]
call fcn.004148d0
mov ebx, dword [ebp - 0x14]
pop ecx
mov eax, dword [ebx + 0xb8]
test eax, eax
je 0x409c03
mov ecx, dword [ebx + 0xbc]
sub ecx, eax
sar ecx, 2
cmp edi, ecx
jae 0x409c03
mov ecx, dword [ebp - 0x38]
lea eax, [eax + edi*4]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00409069
lea ecx, [ebp + 8]
call fcn.0040917d
mov esi, eax
mov eax, dword [ebp + 8]
dec esi
lea ecx, [ebp + 8]
test eax, eax
je 0x409b94
call fcn.00408ccd
mov eax, dword [ebp + 8]
lea ecx, [esi + eax + 0xd]
cmp byte [ecx], 0x5c
jne 0x409bd8
lea ecx, [ebp + 8]
call fcn.0040917d
mov esi, eax
dec esi
cmp dword [ebp + 8], 0
jne 0x409baf
lea eax, [ebp + 8]
jmp 0x409bbe
lea ecx, [ebp + 8]
call fcn.00408ccd
mov eax, dword [ebp + 8]
lea eax, [esi + eax + 0xd]
and byte [eax], 0
mov eax, dword [ebp + 8]
test eax, eax
jne 0x409bcd
lea eax, [ebp + 8]
jmp 0x409bd0
add eax, 0xd
push eax
push 0x1201
jmp 0x409bea
test eax, eax
jne 0x409be1
lea eax, [ebp + 8]
jmp 0x409be4
add eax, 0xd
push eax
push 0x1101
lea ecx, [ebx + 0x104]
call fcn.0041024d
lea ecx, [ebp + 8]
call fcn.0040178c
inc edi
jmp 0x409b42
mov eax, dword [ebp - 0x14]
mov bl, 1
mov dword [eax + 0xf8], 2
lea ecx, [ebp - 8]
call fcn.0040178c
pop edi
mov al, bl
pop esi
pop ebx
leave
ret 4