Function at 0x40e5e0
Capabilities:
Check if file exists
Create directory
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41970d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x26c
mov eax, dword [0x420070]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x260], ecx
cmp dword [ebp + 8], 0
jne 0x40e61b
xor eax, eax
jmp 0x40ea43
push 0x20
call fcn.0040fead
add esp, 4
mov dword [ebp - 0x234], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x234], 0
je 0x40e64e
mov ecx, dword [ebp - 0x234]
call fcn.0040e190
mov dword [ebp - 0x264], eax
jmp 0x40e658
mov dword [ebp - 0x264], 0
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x230], eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x230]
mov dword [ebp - 0x22c], ecx
cmp dword [ebp - 0x22c], 0
jne 0x40e6d3
push 1
mov ecx, dword [ebp + 8]
call fcn.00407280
mov edx, dword [ebp + 8]
mov dword [ebp - 0x23c], edx
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
je 0x40e6c2
push 1
mov ecx, dword [ebp - 0x238]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x238]
call dword [edx]
mov dword [ebp - 0x268], eax
jmp 0x40e6cc
mov dword [ebp - 0x268], 0
xor eax, eax
jmp 0x40ea43
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x22c]
call fcn.0040e270
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x260]
add ecx, 0x30
call fcn.0040c7f0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40e719
push 0
mov ecx, dword [ebp - 0x260]
add ecx, 0x30
call fcn.0040c7f0
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryA]
call fcn.0040ffc5
push eax
mov ecx, dword [ebp - 0x260]
add ecx, 0x30
call fcn.0040c7f0
push eax
mov ecx, dword [ebp - 0x260]
mov edx, dword [ecx + 0x40]
push edx
lea eax, [ebp - 0x224]
push eax
call fcn.0041005f
add esp, 0x10
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40e75d
jmp 0x40e81a
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
cmp edx, 0x7d00
jle 0x40e80d
push 1
mov ecx, dword [ebp + 8]
call fcn.00407280
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x244], ecx
mov edx, dword [ebp - 0x244]
mov dword [ebp - 0x240], edx
cmp dword [ebp - 0x240], 0
je 0x40e7b7
push 1
mov eax, dword [ebp - 0x240]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x240]
call dword [edx]
mov dword [ebp - 0x26c], eax
jmp 0x40e7c1
mov dword [ebp - 0x26c], 0
mov eax, dword [ebp - 0x22c]
mov dword [ebp - 0x24c], eax
mov ecx, dword [ebp - 0x24c]
mov dword [ebp - 0x248], ecx
cmp dword [ebp - 0x248], 0
je 0x40e7fc
push 1
mov edx, dword [ebp - 0x248]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x248]
call dword [eax]
mov dword [ebp - 0x270], eax
jmp 0x40e806
mov dword [ebp - 0x270], 0
xor eax, eax
jmp 0x40ea43
mov ecx, 1
test ecx, ecx
jne 0x40e719
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x40e8de
push 1
mov ecx, dword [ebp + 8]
call fcn.00407280
mov eax, dword [ebp + 8]
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x254]
mov dword [ebp - 0x250], ecx
cmp dword [ebp - 0x250], 0
je 0x40e888
push 1
mov edx, dword [ebp - 0x250]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x250]
call dword [eax]
mov dword [ebp - 0x274], eax
jmp 0x40e892
mov dword [ebp - 0x274], 0
mov ecx, dword [ebp - 0x22c]
mov dword [ebp - 0x25c], ecx
mov edx, dword [ebp - 0x25c]
mov dword [ebp - 0x258], edx
cmp dword [ebp - 0x258], 0
je 0x40e8cd
push 1
mov eax, dword [ebp - 0x258]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x258]
call dword [edx]
mov dword [ebp - 0x278], eax
jmp 0x40e8d7
mov dword [ebp - 0x278], 0
xor eax, eax
jmp 0x40ea43
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp + 8]
call fcn.004072e0
mov dword [ebp - 0x228], eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0x28
mov ecx, dword [ebp - 0x228]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [ebp - 0x228]
cmp dword [eax + 0x10], 0
je 0x40e97e
push 0x41c07c
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0xc]
push ecx
call fcn.00403d50
add esp, 0xc
push 0
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push 0x41c088
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0xc]
push edx
call fcn.00403d50
add esp, 0xc
mov eax, dword [ebp - 0x228]
cmp dword [eax + 0x18], 0
je 0x40e9f0
push 0x41c094
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x18]
push edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x14]
push ecx
call fcn.00403d50
add esp, 0xc
push 0
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push 0x41c0a0
mov edx, dword [ebp - 0x228]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp - 0x228]
mov edx, dword [ecx + 0x14]
push edx
call fcn.00403d50
add esp, 0xc
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea ecx, [ebp - 0x224]
push ecx
mov ecx, dword [ebp - 0x22c]
call fcn.0040e2b0
mov edx, dword [ebp - 0x228]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x22c]
call fcn.0040e330
mov ecx, dword [ebp - 0x22c]
push ecx
mov ecx, dword [ebp - 0x260]
call fcn.0040d030
push 7
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00410051
mov esp, ebp
pop ebp
ret 8