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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49cbed
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x4d7200]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
xor esi, esi
movq qword [ebp - 0x20], xmm0
test edi, edi
je 0x408928
cmp word [edi], si
je 0x408928
nop word [eax + eax]
inc esi
cmp word [edi + esi*2], 0
jne 0x408920
xor ecx, ecx
mov dword [ebp - 0x1c], esi
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a2cb
add esp, 4
mov dword [ebp - 0x20], eax
test esi, esi
jle 0x408967
mov ecx, eax
sub edi, eax
mov edx, esi
mov ax, word [edi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x408954
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov word [eax + esi*2], cx
push 2
push 1
push 1
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x20]
push 1
push 0x4bfc34
mov byte [ebp - 0x18], 1
call fcn.004025a0
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
test eax, eax
jne 0x408a7e
mov dword [ebp - 0x50], esi
test edi, edi
jne 0x4089bb
xor edi, edi
test esi, esi
je 0x4089b8
cmp word [esi], di
je 0x4089b8
nop dword [eax]
inc edi
cmp word [esi + edi*2], 0
jne 0x4089b0
mov dword [ebp - 0x1c], edi
cmp edi, 2
jl 0x408a7e
cmp word [esi + 2], 0x3a
jne 0x408a7e
mov byte [ebp - 0x18], 0
test edi, edi
jne 0x4089eb
cmp word [esi], di
je 0x4089e8
nop dword [eax]
inc edi
cmp word [esi + edi*2], 0
jne 0x4089e0
mov dword [ebp - 0x1c], edi
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + 0x4bfc3c], 0
jne 0x4089f0
add edi, eax
xor ecx, ecx
mov edx, 2
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a2cb
mov esi, 0x4bfc3c
mov dword [ebp - 0x58], eax
add esp, 4
mov ecx, eax
mov edx, 0x5c
sub esi, eax
nop dword [eax + eax]
mov word [ecx], dx
add ecx, 2
movzx eax, word [esi + ecx]
mov edx, eax
test ax, ax
jne 0x408a30
mov esi, dword [ebp - 0x50]
movzx eax, word [esi]
mov edx, eax
mov dword [ebp - 0x50], edx
mov edx, esi
test ax, ax
je 0x408a67
movzx eax, ax
mov word [ecx], ax
lea edx, [edx + 2]
movzx eax, word [edx]
add ecx, 2
test ax, ax
jne 0x408a56
xor eax, eax
push esi
mov word [ecx], ax
call fcn.00489f13
mov esi, dword [ebp - 0x58]
add esp, 4
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x408a9d
test esi, esi
je 0x408a98
cmp word [esi], di
je 0x408a98
nop dword [eax + eax]
inc edi
cmp word [esi + edi*2], 0
jne 0x408a90
mov dword [ebp - 0x1c], edi
test edi, edi
setg byte [ebp - 0x18]
test edi, edi
jle 0x408acc
lea eax, [edi*2 - 2]
nop dword [eax]
cmp word [esi + eax], 0x5c
lea ecx, [esi + eax]
jne 0x408aca
dec edi
xor edx, edx
sub eax, 2
mov dword [ebp - 0x1c], edi
mov word [ecx], dx
test edi, edi
jne 0x408ab0
test edi, edi
jne 0x408aeb
xor edi, edi
test esi, esi
je 0x408ae8
cmp word [esi], di
je 0x408ae8
nop dword [eax]
inc edi
cmp word [esi + edi*2], 0
jne 0x408ae0
mov dword [ebp - 0x1c], edi
cmp edi, 3
jl 0x409116
push 4
push 1
push 1
push 1
push 0x4bfc3c
lea ecx, [ebp - 0x20]
call fcn.004025a0
mov dword [ebp - 0x50], eax
test eax, eax
je 0x408bea
cmp edi, 6
jl 0x408be2
jne 0x408bea
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov byte [ebp - 0x18], 0
test eax, eax
jne 0x408b4b
xor eax, eax
test edi, edi
je 0x408b48
cmp word [edi], ax
je 0x408b48
nop dword [eax]
inc eax
cmp word [edi + eax*2], 0
jne 0x408b40
mov dword [ebp - 0x1c], eax
xor ecx, ecx
nop dword [eax]
inc ecx
cmp word [ecx*2 + 0x4bfbc8], 0
jne 0x408b50
inc ecx
mov edx, 2
add eax, ecx
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a2cb
add esp, 4
mov esi, eax
mov edx, esi
test edi, edi
je 0x408ba1
movzx ecx, word [edi]
mov eax, ecx
test cx, cx
je 0x408ba1
mov edi, dword [ebp - 0x20]
sub edi, esi
nop
mov word [edx], cx
add edx, 2
movzx eax, word [edi + edx]
mov ecx, eax
test ax, ax
jne 0x408b90
mov edi, 0x4bfbc8
mov ecx, 0x5c
sub edi, edx
nop dword [eax]
mov word [edx], cx
lea edx, [edx + 2]
movzx eax, word [edi + edx]
mov ecx, eax
test ax, ax
jne 0x408bb0
mov edi, dword [ebp - 0x20]
xor eax, eax
mov word [edx], ax
test edi, edi
je 0x408bd6
push edi
call fcn.00489f13
add esp, 4
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsRootW]
jmp 0x409118
mov esi, dword [ebp - 0x20]
jmp 0x409116
mov esi, dword [ebp - 0x20]
test esi, esi
jne 0x408c0a
push 2
call fcn.0048a2cb
mov esi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], eax
mov word [esi], ax
jmp 0x408c0d
mov eax, dword [ebp - 0x1c]
push esi
mov dword [ebp - 0x4c], eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x408c26
mov al, 1
jmp 0x409118
test esi, esi
jne 0x408c44
push 2
call fcn.0048a2cb
mov esi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x1c], eax
mov word [esi], ax
push 0
push esi
mov byte [ebp - 0x18], 1
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x408c1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x408c1f
cmp dword [ebp - 0x50], 0
mov ecx, 0x4bfc34
mov eax, 0x4bfc3c
mov dword [ebp - 0x24], 0
cmove eax, ecx
xorps xmm0, xmm0
xor edi, edi
movq qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x58], edi
cmp word [eax], di
je 0x408c9b
nop
inc edi
cmp word [eax + edi*2], 0
jne 0x408c90
mov dword [ebp - 0x58], edi
xor ecx, ecx
mov dword [ebp - 0x28], edi
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a2cb
add esp, 4
mov dword [ebp - 0x2c], eax
test edi, edi
jle 0x408ce6
sub dword [ebp - 0x54], eax
mov edx, edi
mov edi, dword [ebp - 0x54]
mov ecx, eax
nop dword [eax + eax]
mov ax, word [edi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x408cd0
mov edi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov byte [ebp - 0x24], 1
mov word [eax + edi*2], cx
mov byte [ebp - 4], 1
xorps xmm0, xmm0
movq qword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
test edi, edi
jne 0x408d1b
cmp word [eax], di
je 0x408d18
nop dword [eax]
inc edi
cmp word [eax + edi*2], 0
jne 0x408d10
mov dword [ebp - 0x28], edi
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
jne 0x408d3b
test esi, esi
je 0x408d38
cmp word [esi], cx
je 0x408d38
nop dword [eax + eax]
inc ecx
cmp word [esi + ecx*2], 0
jne 0x408d30
mov dword [ebp - 0x1c], ecx
cmp edi, ecx
jl 0x408d43
mov edi, ecx
jmp 0x408d4a
xor eax, eax
test edi, edi
cmovs edi, eax
mov byte [ebp - 0x18], 1
test ecx, ecx
je 0x408d75
sub ecx, edi
xor edx, edx
mov dword [ebp - 0x1c], ecx
test ecx, ecx
jle 0x408d6f
lea edi, [esi + edi*2]
mov ax, word [edi]
lea edi, [edi + 2]
mov word [esi + edx*2], ax
inc edx
cmp edx, ecx
jl 0x408d60
xor eax, eax
mov word [esi + ecx*2], ax
test esi, esi
jne 0x408d90
push 2
call fcn.0048a2cb
mov esi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], eax
mov word [esi], ax
mov byte [ebp - 0x18], 1
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x30], 1
push 1
push 0x4bfbc8
push esi
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 3
call fcn.004032c0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x54], eax
cmp eax, 2
jb 0x4090eb
mov byte [ebp - 0x24], 1
test eax, eax
jne 0x408dee
xor ecx, ecx
jmp 0x408e03
test eax, eax
mov ecx, 1
cmove eax, ecx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x2c]
xor edi, edi
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x4c], edi
cmp word [eax], di
je 0x408e33
inc edi
cmp word [eax + edi*2], 0
jne 0x408e28
mov dword [ebp - 0x4c], edi
test ecx, ecx
je 0x408e4d
xor eax, eax
cmp word [ecx], ax
je 0x408e48
nop
inc eax
cmp word [ecx + eax*2], 0
jne 0x408e40
add edi, eax
mov dword [ebp - 0x4c], edi
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a2cb
mov esi, eax
add esp, 4
mov eax, dword [ebp - 0x2c]
mov ecx, esi
movzx eax, word [eax]
mov edx, eax
test ax, ax
je 0x408e94
mov edi, dword [ebp - 0x2c]
sub edi, esi
nop
mov word [ecx], dx
add ecx, 2
movzx eax, word [ecx + edi]
mov edx, eax
test ax, ax
jne 0x408e80
mov edi, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x5c]
test edx, edx
je 0x408ec4
movzx eax, word [edx]
mov edi, eax
mov dword [ebp - 0x50], edi
mov edi, dword [ebp - 0x4c]
test ax, ax
je 0x408ec4
movzx edi, ax
sub edx, ecx
mov word [ecx], di
add ecx, 2
movzx eax, word [edx + ecx]
mov edi, eax
test ax, ax
jne 0x408eb0
mov edi, dword [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x20], esi
mov word [ecx], ax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x18], 1
test eax, eax
je 0x408ee3
push eax
call fcn.00489f13
add esp, 4
mov ecx, dword [ebp - 0x54]
mov edx, 1
mov dword [ebp - 0x58], edx
cmp ecx, edx
jbe 0x4090bc
test ecx, ecx
jne 0x408efe
xor eax, eax
jmp 0x408f23
cmp edx, ecx
jb 0x408f1d
lea eax, [ecx - 1]
cmp ecx, eax
ja 0x408f12
lea ecx, [eax + 1]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx + eax*4]
mov edx, dword [ebp - 0x58]
jmp 0x408f23
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4]
cmp word [eax], 0
je 0x409050
test ecx, ecx
jne 0x408f35
xor eax, eax
jmp 0x408f4f
cmp edx, ecx
jb 0x408f49
lea edx, [ecx - 1]
cmp ecx, edx
ja 0x408f49
lea eax, [edx + 1]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x5c], eax
mov byte [ebp - 0x18], 0
test edi, edi
jne 0x408f6e
test esi, esi
je 0x408f6b
cmp word [esi], di
je 0x408f6b
inc edi
cmp word [esi + edi*2], 0
jne 0x408f63
mov dword [ebp - 0x1c], edi
xor ecx, ecx
inc ecx
cmp word [ecx*2 + 0x4bfbc8], 0
jne 0x408f70
add edi, ecx
mov dword [ebp - 0x4c], edi
test eax, eax
je 0x408f9d
xor ecx, ecx
cmp word [eax], cx
je 0x408f98
nop dword [eax]
inc ecx
cmp word [eax + ecx*2], 0
jne 0x408f90
add edi, ecx
mov dword [ebp - 0x4c], edi
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a2cb
add esp, 4
mov dword [ebp - 0x50], eax
mov edx, eax
test esi, esi
je 0x408fe1
movzx ecx, word [esi]
mov eax, ecx
test cx, cx
je 0x408fe1
mov edi, esi
sub edi, edx
mov word [edx], cx
add edx, 2
movzx eax, word [edi + edx]
mov ecx, eax
test ax, ax
jne 0x408fd0
mov edi, 0x4bfbc8
mov ecx, 0x5c
sub edi, edx
nop dword [eax]
mov word [edx], cx
add edx, 2
movzx eax, word [edi + edx]
mov ecx, eax
test ax, ax
jne 0x408ff0
mov ecx, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x4c]
test ecx, ecx
je 0x409031
movzx eax, word [ecx]
mov edi, eax
mov dword [ebp - 0x5c], edi
mov edi, dword [ebp - 0x4c]
test ax, ax
je 0x409031
movzx eax, ax
nop
mov word [edx], ax
lea ecx, [ecx + 2]
movzx eax, word [ecx]
add edx, 2
test ax, ax
jne 0x409020
xor eax, eax
mov word [edx], ax
test esi, esi
je 0x409043
push esi
call fcn.00489f13
add esp, 4
mov esi, dword [ebp - 0x50]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x18], 1
test esi, esi
jne 0x40906d
push 2
call fcn.0048a2cb
mov esi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x20], esi
xor edi, edi
mov dword [ebp - 0x1c], edi
mov word [esi], ax
push esi
mov byte [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4090aa
test esi, esi
jne 0x409099
push 2
call fcn.0048a2cb
mov esi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x20], esi
xor edi, edi
mov dword [ebp - 0x1c], edi
mov word [esi], ax
push 0
push esi
mov byte [ebp - 0x18], 1
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4090eb
mov edx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
inc edx
mov dword [ebp - 0x58], edx
cmp edx, ecx
jb 0x408ef6
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4090cc
push eax
call fcn.00489f13
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4090dc
push eax
call fcn.00489f13
add esp, 4
push dword [ebp - 0x2c]
call fcn.00489f13
add esp, 4
mov al, 1
jmp 0x409118
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4090fb
push eax
call fcn.00489f13
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40910b
push eax
call fcn.00489f13
add esp, 4
push dword [ebp - 0x2c]
call fcn.00489f13
add esp, 4
xor al, al
mov byte [ebp - 0x45], al
test esi, esi
je 0x40912b
push esi
call fcn.00489f13
mov al, byte [ebp - 0x45]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00489f05
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret