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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6598be
mov eax, dword fs:[0]
push eax
sub esp, 0x98
mov eax, dword [0x6dc0b8]
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 edx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], eax
mov word [ebp - 0x40], ax
mov byte [ebp - 4], 1
cmp word [edx], ax
jne 0x508667
xor ecx, ecx
jmp 0x50867f
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x508670
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.004169e0
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], 0x2e
push eax
lea ecx, [ebp - 0x28]
call fcn.004ad190
mov esi, eax
cmp esi, 0xffffffff
je 0x508717
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], 0x5c
push eax
lea ecx, [ebp - 0x28]
call fcn.004ad190
cmp esi, eax
jle 0x508717
push eax
push 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.004ad140
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00410c90
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x508703
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
push 2
push 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.004ad140
mov esi, eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 3
cmp eax, esi
je 0x508766
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x508749
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x2c], 7
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.004155f0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x50877f
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00416870
push dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
lea ecx, [ebp - 0x28]
push 3
lea eax, [ebp - 0x58]
mov dword [ebp - 0x48], 0
push eax
call fcn.004ad140
mov esi, eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
cmp eax, esi
je 0x5087e3
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x5087c6
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004155f0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x5087fc
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00416870
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
mov dword [ebp - 0xa4], 0x5c
push 1
push 0
lea eax, [ebp - 0xa4]
push eax
lea ecx, [ebp - 0x28]
call fcn.004ea470
mov edi, eax
lea ecx, [ebp - 0x28]
push edi
push 0
lea eax, [ebp - 0x88]
push eax
call fcn.004ad140
mov esi, eax
push ecx
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x70]
call fcn.00509400
push esi
mov edx, eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x58]
call fcn.00509070
add esp, 8
mov esi, eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 7
cmp eax, esi
je 0x5088aa
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x50888d
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x2c], 7
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.004155f0
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x5088c3
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov dword [ebp - 0x48], 0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x5c]
cmp eax, 8
jb 0x5088f0
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov dword [ebp - 0x60], 0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x74]
cmp eax, 8
jb 0x508923
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x74], 7
cmp dword [ebp - 0x2c], 8
mov word [ebp - 0x88], ax
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
mov dword [ebp - 0x78], 0
call ebx
test eax, eax
jne 0x508960
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push dword [ebp - 0x18]
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0xa0]
push eax
lea ecx, [ebp - 0x28]
call fcn.004ad140
mov esi, eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 8
cmp eax, esi
je 0x5089b5
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x508998
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004155f0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x8c]
cmp eax, 8
jb 0x5089d7
inc eax
lea ecx, [ebp - 0xa0]
push eax
push dword [ebp - 0xa0]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x8c], 7
mov dword [ebp - 0x90], 0
mov word [ebp - 0xa0], ax
test edi, edi
jns 0x508820
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call ebx
test eax, eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x2c]
setne bl
cmp eax, 8
jb 0x508a28
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x508a58
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00416870
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov al, bl
mov dword [ebp - 0x18], 0
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.00545b50
mov esp, ebp
pop ebp
ret 4