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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4428d0
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x4587e8]
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
cmp dword [ecx + 0x10], 0
jne 0x405868
xor al, al
jmp 0x405ae2
xor eax, eax
push 0xffffffffffffffff
push eax
push ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00402ff0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x18]
lea ecx, [edx - 1]
cmp edx, ecx
ja 0x4058b1
push str.invalid_string_position
call fcn.0042341c
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
cmp esi, 8
lea eax, [ebp - 0x28]
cmovae eax, edi
cmp word [eax + ecx*2], 0x5c
je 0x4058f4
cmp edx, ecx
ja 0x4058d5
push str.invalid_string_position
call fcn.0042341c
cmp esi, 8
lea eax, [ebp - 0x28]
cmovae eax, edi
cmp word [eax + ecx*2], 0x2f
je 0x4058f4
push 1
push 0x44fdb4
lea ecx, [ebp - 0x28]
call fcn.00402ec0
lea ecx, [ebp - 0x28]
call fcn.00405420
test al, al
jne 0x405907
xor bh, bh
jmp 0x405ab4
cmp dword [ebp - 0x18], 0
je 0x405930
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete al
test al, al
je 0x405930
mov bh, 1
jmp 0x405ab4
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0x28]
call fcn.004055b0
mov esi, dword [ebp - 0x64]
mov edi, dword [ebp - 0x60]
cmp esi, edi
jne 0x405965
xor bh, bh
jmp 0x405a81
mov bh, 1
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.00402ff0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
lea ecx, [ebp - 0x58]
call fcn.004026b0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x48], 0
jne 0x4059bb
xor al, al
jmp 0x4059d3
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete al
test al, al
sete bl
mov byte [ebp - 4], 2
cmp dword [ebp - 0x44], 8
jb 0x4059ed
push dword [ebp - 0x58]
call fcn.00423c7d
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
test bl, bl
je 0x405a1d
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x405a53
mov byte [ebp - 4], 1
cmp dword [ebp - 0x2c], 8
jb 0x405a32
push dword [ebp - 0x40]
call fcn.00423c7d
add esp, 4
xor eax, eax
add esi, 0x18
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
cmp esi, edi
jne 0x405967
jmp 0x405a7e
xor bh, bh
mov byte [ebp - 4], 1
cmp dword [ebp - 0x2c], 8
jb 0x405a6a
push dword [ebp - 0x40]
call fcn.00423c7d
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov esi, dword [ebp - 0x64]
mov byte [ebp - 4], 0
test esi, esi
je 0x405ab4
push dword [ebp - 0x68]
mov edx, edi
push ecx
mov ecx, esi
call fcn.00404240
push esi
call fcn.00423c7d
add esp, 0xc
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 8
jb 0x405acc
push dword [ebp - 0x28]
call fcn.00423c7d
add esp, 4
xor eax, eax
mov word [ebp - 0x28], ax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov al, bh
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.00423c82
mov esp, ebp
pop ebp
ret