Function at 0x404010
Capabilities:
Check if file exists
Create directory
Get file attributes
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4bb368
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x4ed310]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x4ed310]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], eax
mov word [esp + 0x50], cx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x98], eax
mov edi, dword [ebx + 0x10]
or esi, 0xffffffff
mov byte [esp + 0x24], cl
cmp edi, eax
je 0x4040a3
lea edx, [edi - 1]
test edx, edx
je 0x4040a3
push 2
xor edx, edx
call fcn.00401920
test eax, eax
jne 0x40409a
push 2
lea edx, [eax + 1]
xor esi, esi
call fcn.00401920
cmp eax, 0xffffffff
jne 0x4040a8
mov eax, edi
jmp 0x4040a8
mov byte [esp + 0x24], 1
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x24]
mov dword [esp + 0x14], ecx
push edx
lea ecx, [esp + 0x18]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
mov byte [esp + 0x28], 1
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x30], 0
call fcn.004010b0
test al, al
je 0x404295
jmp 0x4040f0
lea ecx, [esp + 0x6c]
lea eax, [esp + 0x14]
call fcn.00401060
push 0x4ccb58
push eax
lea eax, [esp + 0x3c]
push eax
mov byte [esp + 0xa4], 1
call fcn.00404ad0
add esp, 0xc
push 0xffffffffffffffff
xor ebx, ebx
push ebx
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0xa4], 2
call fcn.00401a20
mov edi, 8
cmp dword [esp + 0x48], edi
jb 0x404147
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0049855c
add esp, 4
xor edx, edx
mov esi, 7
mov byte [esp + 0x98], dl
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov word [esp + 0x34], dx
cmp dword [esp + 0x80], edi
jb 0x404178
mov eax, dword [esp + 0x6c]
push eax
call fcn.0049855c
add esp, 4
mov edx, dword [esp + 0x50]
cmp dword [esp + 0x64], edi
jae 0x404186
lea edx, [esp + 0x50]
xor ecx, ecx
mov eax, edx
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov word [esp + 0x34], cx
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4041a0
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x3c]
call fcn.00401bf0
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x48], edi
jae 0x4041c8
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4041df
test al, 0x10
je 0x4041df
mov eax, 1
jmp 0x4041e1
xor eax, eax
test al, al
sete bl
cmp dword [esp + 0x48], edi
jb 0x4041f9
mov edx, dword [esp + 0x34]
push edx
call fcn.0049855c
add esp, 4
test bl, bl
je 0x40421c
mov eax, dword [esp + 0x50]
cmp dword [esp + 0x64], edi
jae 0x40420b
lea eax, [esp + 0x50]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4042cc
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov edi, dword [ebx + 0x10]
mov dword [esp + 0x18], eax
cmp eax, edi
je 0x404265
lea ecx, [edi - 1]
cmp eax, ecx
je 0x404265
lea esi, [eax + 1]
push 2
mov edx, esi
call fcn.00401920
test eax, eax
jne 0x404254
push 2
lea edx, [esi + 1]
mov dword [esp + 0x1c], esi
call fcn.00401920
cmp eax, 0xffffffff
jne 0x40425f
mov dword [esp + 0x1c], edi
jmp 0x40426a
mov dword [esp + 0x1c], eax
jmp 0x40426a
mov byte [esp + 0x14], 1
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], 1
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x30], 0
call fcn.004010b0
test al, al
jne 0x4040f0
cmp dword [esp + 0x64], 8
jb 0x4042a9
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0049855c
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00499155
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x64], edi
jb 0x4042df
mov eax, dword [esp + 0x50]
push eax
call fcn.0049855c
add esp, 4
xor al, al
jmp 0x4042ab