Function at 0x40a860
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4427e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x188
mov eax, dword [0x4573c0]
fld qword [0x446788]
push ebx
fstp qword [esp + 0x50]
push esi
fld qword [0x446788]
push edi
fstp qword [esp + 0x30]
mov dword [esp + 0x18c], eax
xor eax, eax
mov byte [esp + 0x80], 0
mov ecx, 0x40
lea edi, [esp + 0x81]
rep stosd dword es:[edi], eax
mov ecx, dword [0x45834c]
xor esi, esi
push esi
push esi
stosw word es:[edi], ax
push 0x104
stosb byte es:[edi], al
lea eax, [esp + 0x8c]
push eax
push 0xffffffffffffffff
push ecx
push esi
push esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edx, [esp + 0x80]
push 0x446958
push edx
call fcn.00424987
mov ebx, eax
add esp, 8
cmp ebx, esi
jne 0x40a913
push esi
push str.Error
push 0x446940
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40ae7f
mov eax, dword [ebx + 0x10]
push eax
call fcn.00424a09
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
push 2
push 0xfffffffffffffffc
push ebx
fstp qword [esp + 0x60]
mov dword [esp + 0x50], esi
call fcn.004248e2
push ebx
push 1
lea ecx, [esp + 0x58]
push 4
push ecx
call fcn.00424807
push 2
push 0xffffffffffffffd8
push ebx
mov dword [esp + 0x58], esi
call fcn.004248e2
push ebx
push 1
lea edx, [esp + 0x60]
push 4
push edx
call fcn.00424807
add esp, 0x3c
push 0x44596c
lea ecx, [esp + 0x1c]
call fcn.00403c90
mov eax, dword [0x458350]
push eax
lea ecx, [esp + 0x1c]
push str._s_filelist.xml
push ecx
mov dword [esp + 0x1a8], esi
call fcn.00402f10
mov eax, dword [esp + 0x38]
add esp, 0xc
test eax, eax
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
push eax
jge 0x40a9a9
fadd qword [0x4467a8]
fsubr qword [esp + 0x54]
fsub qword [0x4467b0]
fsub qword [0x446938]
fsub qword [0x4467b0]
call fcn.00424b4c
push eax
mov eax, dword [esp + 0x20]
push ebx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov edi, esp
push eax
call fcn.00401880
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.004091c0
fld qword [0x446930]
mov edx, dword [esp + 0x28]
fstp qword [0x458278]
add esp, 0x10
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40aa1c
push esi
push str.Zmaker_Error
push str.filelist.xml
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40ae56
lea ecx, [esp + 0x64]
call fcn.00417ec0
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x68]
mov byte [esp + 0x1a0], 1
call fcn.004181e0
test eax, eax
je 0x40ae32
push str.FileList
lea ecx, [esp + 0x68]
call fcn.00418df0
test eax, eax
je 0x40ae32
lea ecx, [esp + 0x64]
call fcn.00417780
push 0x44596c
lea ecx, [esp + 0x14]
call fcn.00403c90
push 0x44596c
lea ecx, [esp + 0x18]
mov byte [esp + 0x1a0], 2
call fcn.00403c90
push 0x44596c
lea ecx, [esp + 0x20]
mov byte [esp + 0x1a0], 3
call fcn.00403c90
push str.File
lea ecx, [esp + 0x68]
mov byte [esp + 0x1a0], 4
mov dword [esp + 0x24], esi
mov dword [esp + 0x40], 1
call fcn.00418df0
test eax, eax
je 0x40adc0
cmp dword [esp + 0x3c], esi
je 0x40ab40
push str.startpos
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x6c]
mov dword [esp + 0x44], esi
call fcn.00408a50
mov eax, dword [eax]
push eax
call fcn.004242bb
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
add esp, 4
fstp qword [esp + 0x30]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ab18
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
fld qword [esp + 0x50]
mov eax, dword [esp + 0x2c]
test eax, eax
fsub qword [esp + 0x30]
fild dword [esp + 0x2c]
jge 0x40ab32
fadd qword [0x4467a8]
fsubp st(1)
mov dword [esp + 0x20], 1
fstp qword [esp + 0x58]
push str.name
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x6c]
call fcn.00408a50
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x1a0], 5
call fcn.00402e30
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
mov byte [esp + 0x19c], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ab8b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push str.size
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x6c]
call fcn.00408a50
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x1a0], 6
call fcn.00402e30
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
mov byte [esp + 0x19c], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40abd6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
push 0x44596c
push eax
call fcn.00423e36
add esp, 8
test eax, eax
je 0x40adaa
mov ecx, dword [esp + 0x14]
push 0x44596c
push ecx
call fcn.00423e36
add esp, 8
test eax, eax
je 0x40adaa
mov edx, dword [esp + 0x10]
mov eax, dword [0x458350]
push edx
push eax
lea ecx, [esp + 0x24]
push str._s_s
push ecx
call fcn.00402f10
mov edx, dword [esp + 0x24]
push edx
call fcn.004242bb
fld qword [esp + 0x44]
add esp, 0x14
push eax
call fcn.00424b4c
push eax
mov eax, dword [esp + 0x24]
push ebx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov edi, esp
push eax
call fcn.00401880
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.004091c0
mov eax, dword [esp + 0x50]
push ebx
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.0040a700
mov eax, dword [esp + 0x30]
mov ecx, dword [eax - 4]
add esp, 0x20
cmp ecx, 1
jle 0x40ac93
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x14]
call fcn.00401240
mov eax, dword [esp + 0x10]
push 0x2e
push eax
call fcn.00423e68
mov edi, eax
add esp, 8
cmp edi, esi
je 0x40ad44
push 0x4468d0
push edi
call fcn.00423e36
add esp, 8
test eax, eax
jne 0x40ad44
mov ecx, dword [esp + 0x10]
mov esi, dword [ecx - 0xc]
push edi
call fcn.004237f7
add esp, 4
sub esi, eax
push esi
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x18]
call fcn.00402060
mov eax, dword [esp + 0x28]
mov ecx, dword [0x458350]
push eax
push ecx
push str._s_s
push 0x458348
mov byte [esp + 0x1ac], 7
call fcn.00402f10
mov edx, dword [0x458348]
add esp, 0x10
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, 0x458348
call fcn.004012f0
push eax
lea ecx, [esp + 0x20]
call fcn.004012f0
push eax
call fcn.00409590
add esp, 8
lea ecx, [esp + 0x28]
mov byte [esp + 0x19c], 4
call fcn.004017a0
xor esi, esi
cmp dword [esp + 0x20], esi
je 0x40ad5d
lea eax, [esp + 0x1c]
push eax
mov ecx, 0x458284
mov dword [esp + 0x24], esi
call fcn.00402e30
fld qword [esp + 0x30]
mov ecx, dword [esp + 0x14]
fdiv qword [esp + 0x58]
push ecx
fmul qword [0x4468c8]
fstp qword [0x458278]
call fcn.004242bb
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
add esp, 4
push 0x44596c
lea ecx, [esp + 0x14]
fadd qword [esp + 0x34]
fstp qword [esp + 0x34]
call fcn.00403650
push 0x44596c
lea ecx, [esp + 0x18]
call fcn.00403650
push str.File
lea ecx, [esp + 0x68]
call fcn.00418df0
test eax, eax
jne 0x40aac6
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x19c], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ade6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x19c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ae0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x19c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ae32
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ebx
call fcn.004243c1
add esp, 4
lea ecx, [esp + 0x64]
mov dword [0x458270], 1
mov byte [esp + 0x19c], 0
call fcn.00417620
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x19c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ae7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x194]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x18c]
xor eax, eax
call fcn.00423e28
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4