Function at 0x40eea0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x478050]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov edi, edx
mov dword [ebp - 0x34c], ebx
cmp dword [esi + 0x10], 0x104
jae 0x40f282
cmp dword [edi + 0x10], 0x104
jae 0x40f282
xor eax, eax
mov dword [ebp - 0x24], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], ax
call fcn.004048d0
cmp dword [ebp - 0x24], 8
lea eax, [ebp - 0x38]
cmovae eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40efb7
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x20]
call fcn.0040ebe0
lea ecx, [ebp - 0x38]
cmp ecx, eax
je 0x40ef2e
push 0xffffffffffffffff
push ebx
push eax
call fcn.004048d0
mov eax, dword [ebp - 0xc]
cmp eax, 8
jb 0x40ef43
inc eax
lea ecx, [ebp - 0x20]
push eax
push dword [ebp - 0x20]
call fcn.00405f00
cmp dword [ebp - 0x28], ebx
je 0x40f021
mov edx, esi
lea ecx, [ebp - 0x98]
call fcn.0040ebe0
mov eax, dword [ebp - 0x88]
test eax, eax
je 0x40f21d
cmp dword [ebp - 0x28], eax
jb 0x40ef85
lea ecx, [ebp - 0x98]
push ecx
push eax
push ecx
lea ecx, [ebp - 0x38]
call fcn.0040ae70
test eax, eax
je 0x40f21d
push 3
push ecx
push esi
lea ecx, [ebp - 0x344]
call fcn.0041a290
push esi
call fcn.0040f2a0
add esp, 4
test al, al
jne 0x40f028
lea ecx, [ebp - 0x344]
xor bl, bl
call fcn.0041a440
jmp 0x40f21f
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x38]
call fcn.0040d5c0
mov edx, eax
lea ecx, [ebp - 0x20]
call fcn.0040ebe0
lea ecx, [ebp - 0x38]
cmp ecx, eax
je 0x40efde
push 0xffffffffffffffff
push 0
push eax
call fcn.004048d0
mov eax, dword [ebp - 0xc]
cmp eax, 8
jb 0x40eff3
inc eax
lea ecx, [ebp - 0x20]
push eax
push dword [ebp - 0x20]
call fcn.00405f00
xor eax, eax
mov dword [ebp - 0xc], 7
mov word [ebp - 0x20], ax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x10], ebx
cmp eax, 8
jb 0x40f018
inc eax
lea ecx, [ebp - 0x68]
push eax
push dword [ebp - 0x68]
call fcn.00405f00
cmp dword [ebp - 0x28], ebx
jne 0x40ef4c
xor bl, bl
jmp 0x40f25a
push esi
lea ecx, [ebp - 0x50]
call fcn.00402ea0
mov ecx, esi
call fcn.0040f2c0
push esi
lea ecx, [ebp - 0x80]
mov byte [ebp - 0x34c], al
mov byte [ebp - 0x345], 1
call fcn.00402ea0
mov ecx, edi
call fcn.0040f2c0
test al, al
je 0x40f07d
lea eax, [ebp - 0x68]
mov ecx, esi
push eax
call fcn.0040d5c0
lea ecx, [ebp - 0x80]
cmp ecx, eax
je 0x40f075
push 0xffffffffffffffff
push 0
push eax
call fcn.004048d0
lea ecx, [ebp - 0x68]
call fcn.00402d80
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [ebp - 0x40], 0
je 0x40f1ee
xor eax, eax
mov dword [ebp - 0xc], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x10], 0
mov word [ebp - 0x20], ax
call fcn.004048d0
sub esp, 8
lea eax, [ebp - 0x50]
cmp dword [ebp - 0x3c], 8
mov ecx, esp
cmovae eax, dword [ebp - 0x50]
sub esp, 8
mov dword [ecx], eax
mov eax, dword [ebp - 0x40]
mov dword [ecx + 4], eax
mov ecx, esp
cmp dword [ebp - 0x6c], 8
lea eax, [ebp - 0x80]
cmovae eax, dword [ebp - 0x80]
mov dword [ecx], eax
mov eax, dword [ebp - 0x70]
mov dword [ecx + 4], eax
call fcn.0040cca0
add esp, 0x10
test al, al
jne 0x40f101
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x80]
call fcn.0040d370
test al, al
je 0x40f211
cmp byte [ebp - 0x34c], 0
je 0x40f146
cmp dword [ebp - 0xc], 8
lea eax, [ebp - 0x20]
cmovae eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f128
shr eax, 4
and al, 1
jne 0x40f16f
cmp dword [ebp - 0xc], 8
lea eax, [ebp - 0x20]
push 0
cmovae eax, dword [ebp - 0x20]
push eax
call esi
test eax, eax
jne 0x40f16f
test bl, 4
je 0x40f168
and ebx, 0xfffffffb
jmp 0x40f15d
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x50]
call fcn.0040fb20
test al, al
jne 0x40f16f
test bl, 8
je 0x40f168
and ebx, 0xfffffff7
lea ecx, [ebp - 0x3fc]
call fcn.00402420
mov byte [ebp - 0x345], 0
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x344]
call fcn.0041a540
lea ecx, [ebp - 0x50]
cmp ecx, eax
je 0x40f18f
push 0xffffffffffffffff
push 0
push eax
call fcn.004048d0
mov eax, dword [ebp - 0x54]
cmp eax, 8
jb 0x40f1a4
inc eax
lea ecx, [ebp - 0x68]
push eax
push dword [ebp - 0x68]
call fcn.00405f00
cmp dword [ebp - 0x40], 0
je 0x40f1cc
lea eax, [ebp - 0x64c]
push eax
lea ecx, [ebp - 0x344]
call fcn.0041a4e0
mov eax, dword [eax]
shr eax, 4
and eax, 0xffffff01
mov dword [ebp - 0x34c], eax
mov eax, dword [ebp - 0xc]
cmp eax, 8
jb 0x40f1e1
inc eax
lea ecx, [ebp - 0x20]
push eax
push dword [ebp - 0x20]
call fcn.00405f00
cmp byte [ebp - 0x345], 0
jne 0x40f083
mov bl, byte [ebp - 0x345]
lea ecx, [ebp - 0x80]
call fcn.00402d80
lea ecx, [ebp - 0x50]
call fcn.00402d80
lea ecx, [ebp - 0x344]
call fcn.0041a440
jmp 0x40f21f
lea ecx, [ebp - 0x20]
xor bl, bl
call fcn.00402d80
jmp 0x40f1f4
xor bl, bl
mov eax, dword [ebp - 0x84]
cmp eax, 8
jb 0x40f23d
inc eax
lea ecx, [ebp - 0x98]
push eax
push dword [ebp - 0x98]
call fcn.00405f00
xor eax, eax
mov dword [ebp - 0x84], 7
mov dword [ebp - 0x88], 0
mov word [ebp - 0x98], ax
mov ecx, dword [ebp - 0x24]
cmp ecx, 8
jb 0x40f26f
inc ecx
push ecx
push dword [ebp - 0x38]
lea ecx, [ebp - 0x38]
call fcn.00405f00
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00447880
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00447880
mov esp, ebp
pop ebp
ret