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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4225d5
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x42d040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push 0x4243a4
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x4c]
push ebx
push eax
mov dword [ebp - 0x58], ebx
call fcn.00408c60
add esp, 0xc
cmp dword [ebp - 0x38], 0xf
lea eax, [ebp - 0x4c]
mov dword [ebp - 4], 0
cmova eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4099bf
test al, 0x10
jne 0x409938
xor esi, esi
push esi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x54], esi
push str._08X
push eax
call fcn.00402a00
add esp, 0xc
lea ecx, [ebp - 0x34]
push ebx
call fcn.00408d60
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x24]
mov byte [ebp - 4], 1
mov dword [ebp - 0x50], edi
cmp ebx, edi
jae 0x40964f
lea eax, [ebx + 1]
cmp edi, 0xf
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x34]
cmova eax, dword [ebp - 0x34]
mov word [eax + ebx], 0x7e
jmp 0x40972c
mov edx, SysReAllocString
mov eax, edx
sub eax, ebx
cmp eax, 1
jb 0x409a14
lea esi, [ebx + 1]
or esi, 0xf
cmp esi, edx
jbe 0x40967a
mov eax, SysReAllocString
mov esi, edx
push eax
call fcn.00401930
jmp 0x4096bd
mov ecx, edi
mov eax, edx
shr ecx, 1
sub eax, ecx
cmp edi, eax
jbe 0x409695
mov eax, SysReAllocString
mov esi, edx
push eax
call fcn.00401930
jmp 0x4096bd
lea eax, [ecx + edi]
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
test eax, eax
jne 0x4096a8
xor edi, edi
jmp 0x4096c2
cmp eax, 0x1000
jb 0x4096b7
push eax
call fcn.00401930
jmp 0x4096bd
push eax
call fcn.0040a1ab
mov edi, eax
add esp, 4
cmp dword [ebp - 0x50], 0xf
lea eax, [ebx + 1]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
push ebx
jbe 0x409713
mov esi, dword [ebp - 0x34]
push esi
push edi
call fcn.0040b6f0
mov ecx, dword [ebp - 0x50]
add esp, 0xc
inc ecx
mov word [ebx + edi], 0x7e
cmp ecx, 0x1000
jb 0x409707
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x409a0f
mov esi, edx
push ecx
push esi
call fcn.0040a17a
add esp, 8
jmp 0x409726
lea eax, [ebp - 0x34]
push eax
push edi
call fcn.0040b6f0
add esp, 0xc
mov word [ebx + edi], 0x7e
mov esi, dword [ebp - 0x54]
mov dword [ebp - 0x34], edi
lea ecx, [ebp - 0x1c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409732
sub ecx, edx
lea eax, [ebp - 0x1c]
push ecx
push eax
lea ecx, [ebp - 0x34]
call fcn.004083b0
push 0
push 0x4243a4
lea ecx, [ebp - 0x34]
call fcn.004083b0
cmp dword [ebp - 0x20], 0xf
lea eax, [ebp - 0x34]
cmova eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40997f
test al, 0x10
jne 0x4097fc
mov ecx, dword [ebp - 0x20]
cmp esi, 0xffffffff
je 0x4097c0
mov byte [ebp - 4], 0
cmp ecx, 0xf
jbe 0x4097b7
mov edx, dword [ebp - 0x34]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4097ad
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409a0f
push ecx
push edx
call fcn.0040a17a
add esp, 8
mov ebx, dword [ebp - 0x58]
inc esi
jmp 0x409605
cmp ecx, 0xf
jbe 0x4099db
mov edx, dword [ebp - 0x34]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4097eb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409a0f
push ecx
push edx
call fcn.0040a17a
add esp, 8
xor esi, esi
jmp 0x40994f
cmp dword [ebp - 0x20], 0xf
lea ebx, [ebp - 0x34]
mov eax, dword [ebp - 0x38]
cmova ebx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x50], eax
cmp edi, eax
ja 0x409838
cmp eax, 0xf
mov dword [ebp - 0x3c], edi
push edi
lea esi, [ebp - 0x4c]
cmova esi, dword [ebp - 0x4c]
push ebx
push esi
call fcn.0040b6f0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x409900
cmp edi, 0x7fffffff
ja 0x409a14
mov esi, edi
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x409863
mov eax, SysReAllocString
mov esi, SysReAllocString
push eax
call fcn.00401930
jmp 0x4098ab
mov ecx, eax
mov edx, SysReAllocString
shr ecx, 1
sub edx, ecx
cmp eax, edx
jbe 0x409884
mov eax, SysReAllocString
mov esi, SysReAllocString
push eax
call fcn.00401930
jmp 0x4098ab
add eax, ecx
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
test eax, eax
jne 0x409896
xor ebx, ebx
jmp 0x4098b0
cmp eax, 0x1000
jb 0x4098a5
push eax
call fcn.00401930
jmp 0x4098ab
push eax
call fcn.0040a1ab
mov ebx, eax
add esp, 4
push edi
push dword [ebp - 0x58]
mov dword [ebp - 0x3c], edi
push ebx
mov dword [ebp - 0x38], esi
call fcn.0040b6f0
mov eax, dword [ebp - 0x50]
add esp, 0xc
mov byte [ebx + edi], 0
cmp eax, 0xf
jbe 0x4098fd
mov edx, dword [ebp - 0x4c]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x4098f3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409a0f
push ecx
push edx
call fcn.0040a17a
add esp, 8
mov dword [ebp - 0x4c], ebx
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], 0
cmp ecx, 0xf
jbe 0x409938
mov edx, dword [ebp - 0x34]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40992e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409a0f
push ecx
push edx
call fcn.0040a17a
add esp, 8
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x40994a
lea ecx, [ebp - 0x4c]
push ecx
mov ecx, eax
call fcn.00408ee0
mov esi, 1
mov ecx, dword [ebp - 0x38]
cmp ecx, 0xf
jbe 0x4099ec
mov edx, dword [ebp - 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4099e2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409a0a
jmp 0x4099e2
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00408ee0
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], 0
cmp ecx, 0xf
jbe 0x4099bf
mov edx, dword [ebp - 0x34]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4099b5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409a0f
push ecx
push edx
call fcn.0040a17a
add esp, 8
cmp dword [ebp - 0x38], 0xf
lea eax, [ebp - 0x4c]
push 0
cmova eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x409938
xor esi, esi
jmp 0x40994f
push ecx
push edx
call fcn.0040a17a
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040a16c
mov esp, ebp
pop ebp
ret
call fcn.00410cd4
call fcn.00410cd4
call fcn.00401fa0
int3