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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
mov eax, dword [0x452550]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
cmp dword [ebp + 8], 0
je 0x412076
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x412076
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
test eax, eax
jne 0x412085
jmp 0x4122bf
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x214], ecx
mov edx, dword [ebp - 0x214]
mov dword [ebp - 0x218], edx
mov eax, dword [ebp - 0x218]
movsx ecx, byte [eax]
test ecx, ecx
je 0x4120e0
mov edx, dword [ebp - 0x218]
movsx eax, byte [edx]
cmp eax, 0x2f
je 0x4120c3
mov ecx, dword [ebp - 0x218]
movsx edx, byte [ecx]
cmp edx, 0x5c
jne 0x4120cf
mov eax, dword [ebp - 0x218]
mov dword [ebp - 0x214], eax
mov ecx, dword [ebp - 0x218]
add ecx, 1
mov dword [ebp - 0x218], ecx
jmp 0x41209a
mov edx, dword [ebp - 0x214]
mov dword [ebp - 0x234], edx
mov eax, dword [ebp - 0x214]
cmp eax, dword [ebp + 0xc]
je 0x412166
mov ecx, dword [ebp - 0x214]
sub ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x20c]
push eax
call fcn.0042d650
add esp, 0xc
mov ecx, dword [ebp - 0x214]
sub ecx, dword [ebp + 0xc]
mov dword [ebp - 0x238], ecx
cmp dword [ebp - 0x238], 0x104
jae 0x412131
jmp 0x412136
call fcn.00429528
mov edx, dword [ebp - 0x238]
mov byte [ebp + edx - 0x20c], 0
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00412040
add esp, 8
mov edx, dword [ebp - 0x234]
add edx, 1
mov dword [ebp - 0x234], edx
mov eax, 1
imul ecx, eax, 0
mov dword [ebp - 0x230], ecx
cmp dword [ebp - 0x230], 0x104
jae 0x412182
jmp 0x412187
call fcn.00429528
mov edx, dword [ebp - 0x230]
mov byte [ebp + edx - 0x108], 0
cmp dword [ebp + 8], 0
je 0x4121ff
mov eax, dword [ebp + 8]
mov dword [ebp - 0x228], eax
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x224], ecx
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x244], edx
mov eax, dword [ebp - 0x228]
mov cl, byte [eax]
mov byte [ebp - 0x20d], cl
mov edx, dword [ebp - 0x224]
mov al, byte [ebp - 0x20d]
mov byte [edx], al
mov ecx, dword [ebp - 0x228]
add ecx, 1
mov dword [ebp - 0x228], ecx
mov edx, dword [ebp - 0x224]
add edx, 1
mov dword [ebp - 0x224], edx
cmp byte [ebp - 0x20d], 0
jne 0x4121bc
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x21c], eax
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x22c], ecx
mov edx, dword [ebp - 0x21c]
mov al, byte [edx]
mov byte [ebp - 0x20f], al
add dword [ebp - 0x21c], 1
cmp byte [ebp - 0x20f], 0
jne 0x412214
mov ecx, dword [ebp - 0x21c]
sub ecx, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x22c]
mov dword [ebp - 0x240], edx
mov dword [ebp - 0x23c], ecx
lea eax, [ebp - 0x108]
add eax, 0xffffffff
mov dword [ebp - 0x220], eax
mov ecx, dword [ebp - 0x220]
mov dl, byte [ecx + 1]
mov byte [ebp - 0x20e], dl
add dword [ebp - 0x220], 1
cmp byte [ebp - 0x20e], 0
jne 0x41225f
mov edi, dword [ebp - 0x220]
mov esi, dword [ebp - 0x240]
mov eax, dword [ebp - 0x23c]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4122bf
push 0
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00427fb1
mov esp, ebp
pop ebp
ret