Function at 0x40bc70
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 0x47cc8d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x4b41e0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
xor eax, eax
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x18], 0
test esi, esi
je 0x40bcdd
cmp word [esi], ax
je 0x40bcdd
inc eax
cmp word [esi + eax*2], 0
jne 0x40bcd5
mov dword [ebp - 0x1c], eax
xor ecx, ecx
inc eax
mov edi, 2
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
mov edx, eax
add esp, 4
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov dword [ebp - 0x20], edx
test eax, eax
jle 0x40bd23
nop dword [eax + eax]
mov ax, word [esi + ecx*2]
mov word [edx + ecx*2], ax
inc ecx
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
cmp ecx, eax
jl 0x40bd10
xor ecx, ecx
mov word [edx + eax*2], cx
push 2
push 1
push 1
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x20]
push 1
push 0x49eabc
mov byte [ebp - 0x18], 1
call fcn.00402320
test eax, eax
jne 0x40be3c
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x40bd6d
xor eax, eax
test ecx, ecx
je 0x40bd6a
cmp word [ecx], ax
je 0x40bd6a
inc eax
cmp word [ecx + eax*2], 0
jne 0x40bd62
mov dword [ebp - 0x1c], eax
cmp eax, 2
jl 0x40be3c
cmp word [ecx + 2], 0x3a
jne 0x40be3c
mov byte [ebp - 0x18], 0
test eax, eax
jne 0x40bd9b
cmp word [ecx], ax
je 0x40bd98
nop
inc eax
cmp word [ecx + eax*2], 0
jne 0x40bd90
mov dword [ebp - 0x1c], eax
xor ecx, ecx
nop dword [eax]
inc ecx
cmp word [ecx*2 + 0x49eac4], 0
jne 0x40bda0
add eax, ecx
xor ecx, ecx
mov dword [ebp - 0x54], eax
inc eax
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
mov edx, dword [ebp - 0x20]
mov edi, 0x49eac4
add esp, 4
mov dword [ebp - 0x4c], eax
mov ecx, eax
mov esi, 0x5c
sub edi, eax
nop word [eax + eax]
mov word [ecx], si
add ecx, 2
movzx eax, word [edi + ecx]
mov esi, eax
test ax, ax
jne 0x40bde0
cmp dword [ebp - 0x20], 0
je 0x40be12
movzx eax, word [edx]
mov esi, eax
test ax, ax
je 0x40be12
mov word [ecx], ax
lea edx, [edx + 2]
movzx eax, word [edx]
add ecx, 2
test ax, ax
jne 0x40be01
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40be27
push eax
call fcn.00469e73
add esp, 4
mov eax, dword [ebp - 0x4c]
mov edi, 2
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 1
push ecx
lea ecx, [ebp - 0x20]
call fcn.00402f20
mov esi, dword [eax + 4]
test esi, esi
jne 0x40be62
mov ecx, dword [eax]
test ecx, ecx
je 0x40be5f
cmp word [ecx], si
je 0x40be5f
inc esi
cmp word [ecx + esi*2], 0
jne 0x40be57
mov dword [eax + 4], esi
cmp esi, 3
jl 0x40c4d4
push 4
push 1
push 1
push 1
push 0x49eac4
lea ecx, [ebp - 0x20]
call fcn.00402320
test eax, eax
setne byte [ebp - 0x45]
test eax, eax
je 0x40bf5f
cmp esi, 6
jl 0x40c4d4
jne 0x40bf5f
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 0x18], 0
test eax, eax
jne 0x40bebf
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x40bebc
cmp word [ecx], ax
je 0x40bebc
inc eax
cmp word [ecx + eax*2], 0
jne 0x40beb4
mov dword [ebp - 0x1c], eax
xor ecx, ecx
inc ecx
cmp word [ecx*2 + 0x49eab0], 0
jne 0x40bec1
add eax, ecx
xor ecx, ecx
mov dword [ebp - 0x4c], eax
inc eax
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
mov edx, dword [ebp - 0x20]
add esp, 4
mov edi, eax
mov ecx, edi
test edx, edx
je 0x40bf11
movzx esi, word [edx]
test si, si
je 0x40bf11
mov eax, esi
nop dword [eax]
mov word [ecx], ax
lea edx, [edx + 2]
movzx eax, word [edx]
add ecx, 2
test ax, ax
jne 0x40bf00
mov esi, 0x49eab0
mov edx, 0x5c
sub esi, ecx
nop dword [eax]
mov word [ecx], dx
lea ecx, [ecx + 2]
movzx eax, word [esi + ecx]
mov edx, eax
test ax, ax
jne 0x40bf20
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40bf46
push eax
call fcn.00469e73
add esp, 4
mov eax, dword [ebp - 0x4c]
push edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_PathIsRootW]
jmp 0x40c4d6
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x40bf7e
push 2
call fcn.0046a22b
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
push eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x40bf94
mov al, 1
jmp 0x40c4d6
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x40bfb3
push 2
call fcn.0046a22b
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
push 0
push eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40bf8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40bf8d
cmp byte [ebp - 0x45], 0
mov edi, 0x49eac4
mov eax, 0x49eabc
mov dword [ebp - 0x24], 0
cmove edi, eax
xorps xmm0, xmm0
xor esi, esi
movq qword [ebp - 0x2c], xmm0
cmp word [edi], si
je 0x40c000
inc esi
cmp word [edi + esi*2], 0
jne 0x40bff8
xor ecx, ecx
mov dword [ebp - 0x28], esi
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
add esp, 4
mov dword [ebp - 0x2c], eax
test esi, esi
jle 0x40c043
mov ecx, eax
sub edi, eax
mov edx, esi
nop dword [eax]
mov ax, word [edi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x40c030
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov byte [ebp - 0x24], 1
mov word [eax + esi*2], cx
mov byte [ebp - 4], 1
xorps xmm0, xmm0
movq qword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
test esi, esi
jne 0x40c071
cmp word [eax], si
je 0x40c06e
inc esi
cmp word [eax + esi*2], 0
jne 0x40c066
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x40c091
xor eax, eax
test ecx, ecx
je 0x40c08e
cmp word [ecx], ax
je 0x40c08e
inc eax
cmp word [ecx + eax*2], 0
jne 0x40c086
mov dword [ebp - 0x1c], eax
cmp esi, eax
jl 0x40c099
mov esi, eax
jmp 0x40c0a0
xor edx, edx
test esi, esi
cmovs esi, edx
mov byte [ebp - 0x18], 1
test eax, eax
je 0x40c0d4
sub eax, esi
xor edx, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jle 0x40c0cb
add esi, esi
mov ax, word [ecx + esi]
lea esi, [esi + 2]
mov word [ecx + edx*2], ax
inc edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
cmp edx, eax
jl 0x40c0b5
xor edx, edx
mov word [ecx + eax*2], dx
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x40c0f0
push 2
call fcn.0046a22b
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x20]
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 0x49eab0
push ecx
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 3
call fcn.00403640
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0x50], edi
cmp edi, 2
jb 0x40c4a9
mov byte [ebp - 0x24], 1
test edi, edi
jne 0x40c14e
xor ecx, ecx
jmp 0x40c163
mov eax, 1
test edi, edi
cmove edi, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x44], edi
mov ecx, dword [eax]
mov eax, dword [ebp - 0x20]
xor esi, esi
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x54], ecx
cmp word [eax], si
je 0x40c190
inc esi
cmp word [eax + esi*2], 0
jne 0x40c188
test ecx, ecx
je 0x40c1aa
xor eax, eax
cmp word [ecx], ax
je 0x40c1a8
nop dword [eax + eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x40c1a0
add esi, eax
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
mov edx, eax
add esp, 4
mov eax, dword [ebp - 0x20]
mov ecx, edx
mov dword [ebp - 0x58], edx
test eax, eax
je 0x40c1f8
movzx edi, word [eax]
test di, di
je 0x40c1f8
movzx edi, word [eax]
mov dword [ebp - 0x4c], edi
mov edx, edi
mov word [ecx], dx
lea eax, [eax + 2]
movzx edx, word [eax]
add ecx, 2
test dx, dx
jne 0x40c1e4
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x2c]
movzx eax, word [eax]
mov edi, eax
mov dword [ebp - 0x4c], edi
mov edi, dword [ebp - 0x50]
test ax, ax
je 0x40c22a
mov edx, dword [ebp - 0x2c]
movzx edi, ax
sub edx, ecx
mov word [ecx], di
add ecx, 2
movzx eax, word [ecx + edx]
mov edi, eax
test ax, ax
jne 0x40c213
mov edi, dword [ebp - 0x50]
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x40c267
movzx eax, word [eax]
mov edi, eax
mov dword [ebp - 0x4c], edi
mov edi, dword [ebp - 0x50]
test ax, ax
je 0x40c267
mov edi, dword [ebp - 0x54]
movzx edx, ax
sub edi, ecx
nop dword [eax]
mov word [ecx], dx
add ecx, 2
movzx eax, word [ecx + edi]
mov edx, eax
test ax, ax
jne 0x40c250
mov edi, dword [ebp - 0x50]
mov edx, dword [ebp - 0x58]
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40c27f
push eax
call fcn.00469e73
mov edx, dword [ebp - 0x58]
add esp, 4
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x18], 1
test eax, eax
je 0x40c29f
push eax
call fcn.00469e73
mov esi, dword [ebp - 0x1c]
add esp, 4
mov edx, dword [ebp - 0x20]
mov ecx, 1
mov dword [ebp - 0x54], ecx
cmp edi, ecx
jbe 0x40c47a
nop
test edi, edi
jne 0x40c2b8
xor eax, eax
jmp 0x40c2dd
cmp ecx, edi
jb 0x40c2d7
lea eax, [edi - 1]
cmp edi, eax
ja 0x40c2cc
lea edi, [eax + 1]
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x44], edi
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + eax*4]
mov ecx, dword [ebp - 0x54]
jmp 0x40c2dd
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + ecx*4]
cmp word [eax], 0
je 0x40c406
test edi, edi
je 0x40c305
cmp ecx, edi
jb 0x40c2ff
lea ecx, [edi - 1]
cmp edi, ecx
ja 0x40c2ff
lea eax, [ecx + 1]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x3c]
mov edi, dword [eax + ecx*4]
mov byte [ebp - 0x18], 0
test esi, esi
jne 0x40c321
test edx, edx
je 0x40c31e
cmp word [edx], si
je 0x40c31e
inc esi
cmp word [edx + esi*2], 0
jne 0x40c316
mov dword [ebp - 0x1c], esi
xor eax, eax
nop dword [eax]
nop word [eax + eax]
lea eax, [eax + 1]
cmp word [eax*2 + 0x49eab0], 0
jne 0x40c330
lea ecx, [esi + eax]
mov dword [ebp - 0x4c], ecx
test edi, edi
je 0x40c35d
xor eax, eax
cmp word [edi], ax
je 0x40c358
nop
inc eax
cmp word [edi + eax*2], 0
jne 0x40c350
add ecx, eax
mov dword [ebp - 0x4c], ecx
lea eax, [ecx + 1]
mov edx, 2
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a22b
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x58], ecx
test eax, eax
je 0x40c3a1
movzx edx, word [eax]
test dx, dx
je 0x40c3a1
nop dword [eax]
mov word [ecx], dx
lea eax, [eax + 2]
movzx edx, word [eax]
add ecx, 2
test dx, dx
jne 0x40c390
mov esi, 0x49eab0
mov edx, 0x5c
sub esi, ecx
nop dword [eax]
mov word [ecx], dx
add ecx, 2
movzx eax, word [esi + ecx]
mov edx, eax
test ax, ax
jne 0x40c3b0
test edi, edi
je 0x40c3e1
movzx eax, word [edi]
mov edx, eax
test ax, ax
je 0x40c3e1
nop
mov word [ecx], ax
lea edi, [edi + 2]
movzx eax, word [edi]
add ecx, 2
test ax, ax
jne 0x40c3d0
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40c3f6
push eax
call fcn.00469e73
add esp, 4
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 1
test edx, edx
jne 0x40c422
push 2
call fcn.0046a22b
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
push edx
mov byte [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c461
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x40c450
push 2
call fcn.0046a22b
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
push 0
push eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40c4a9
mov ecx, dword [ebp - 0x54]
mov edi, dword [ebp - 0x50]
inc ecx
mov dword [ebp - 0x54], ecx
cmp ecx, edi
jae 0x40c47a
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
jmp 0x40c2b0
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40c48a
push eax
call fcn.00469e73
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40c49a
push eax
call fcn.00469e73
add esp, 4
push dword [ebp - 0x2c]
call fcn.00469e73
add esp, 4
mov al, 1
jmp 0x40c4d6
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40c4b9
push eax
call fcn.00469e73
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40c4c9
push eax
call fcn.00469e73
add esp, 4
push dword [ebp - 0x2c]
call fcn.00469e73
add esp, 4
xor al, al
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 0x45], al
test ecx, ecx
je 0x40c4ec
push ecx
call fcn.00469e73
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.00469e65
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret