Function at 0x40bb70
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 0x47e11d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x4b5200]
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 0x40bbdd
cmp word [esi], ax
je 0x40bbdd
inc eax
cmp word [esi + eax*2], 0
jne 0x40bbd5
mov dword [ebp - 0x1c], eax
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov edx, eax
add esp, 4
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov dword [ebp - 0x20], edx
test eax, eax
jle 0x40bc23
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 0x40bc10
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 0x49fab4
mov byte [ebp - 0x18], 1
call fcn.00402380
mov edi, 0x49fabc
test eax, eax
jne 0x40bd3c
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x40bc72
xor eax, eax
test ecx, ecx
je 0x40bc6f
cmp word [ecx], ax
je 0x40bc6f
inc eax
cmp word [ecx + eax*2], 0
jne 0x40bc67
mov dword [ebp - 0x1c], eax
cmp eax, 2
jl 0x40bd3c
cmp word [ecx + 2], 0x3a
jne 0x40bd3c
mov byte [ebp - 0x18], 0
test eax, eax
jne 0x40bc9e
cmp word [ecx], ax
je 0x40bc9b
inc eax
cmp word [ecx + eax*2], 0
jne 0x40bc93
mov dword [ebp - 0x1c], eax
xor ecx, ecx
inc ecx
cmp word [ecx*2 + 0x49fabc], 0
jne 0x40bca0
add eax, ecx
mov edx, 2
mov dword [ebp - 0x58], eax
xor ecx, ecx
inc eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov edx, dword [ebp - 0x20]
add esp, 4
mov dword [ebp - 0x54], 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 0x40bce0
cmp dword [ebp - 0x20], 0
mov edi, 0x49fabc
je 0x40bd17
movzx eax, word [edx]
mov esi, eax
test ax, ax
je 0x40bd17
mov word [ecx], ax
lea edx, [edx + 2]
movzx eax, word [edx]
add ecx, 2
test ax, ax
jne 0x40bd06
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40bd2c
push eax
call fcn.0046b303
add esp, 4
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 1
push ecx
lea ecx, [ebp - 0x20]
call fcn.00402f70
mov esi, dword [eax + 4]
test esi, esi
jne 0x40bd62
mov ecx, dword [eax]
test ecx, ecx
je 0x40bd5f
cmp word [ecx], si
je 0x40bd5f
inc esi
cmp word [ecx + esi*2], 0
jne 0x40bd57
mov dword [eax + 4], esi
cmp esi, 3
jl 0x40c3d4
push 4
push 1
push 1
push 1
push 0x49fabc
lea ecx, [ebp - 0x20]
call fcn.00402380
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x40be5f
cmp esi, 6
jl 0x40c3d4
jne 0x40be5f
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 0x18], 0
test eax, eax
jne 0x40bdbc
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x40bdb9
cmp word [ecx], ax
je 0x40bdb9
inc eax
cmp word [ecx + eax*2], 0
jne 0x40bdb1
mov dword [ebp - 0x1c], eax
xor ecx, ecx
nop
inc ecx
cmp word [ecx*2 + 0x49faa8], 0
jne 0x40bdc0
add eax, ecx
mov edx, 2
mov dword [ebp - 0x4c], eax
xor ecx, ecx
inc eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov edx, dword [ebp - 0x20]
add esp, 4
mov edi, eax
mov ecx, edi
test edx, edx
je 0x40be11
movzx esi, word [edx]
test si, si
je 0x40be11
mov eax, esi
mov word [ecx], ax
lea edx, [edx + 2]
movzx eax, word [edx]
add ecx, 2
test ax, ax
jne 0x40be00
mov esi, 0x49faa8
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 0x40be20
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40be46
push eax
call fcn.0046b303
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 0x40c3d6
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x40be7e
push 2
call fcn.0046b90c
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 0x40be94
mov al, 1
jmp 0x40c3d6
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x40beb3
push 2
call fcn.0046b90c
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 0x40be8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40be8d
cmp dword [ebp - 0x4c], 0
mov eax, 0x49fab4
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0
cmove edi, eax
movq qword [ebp - 0x2c], xmm0
xor esi, esi
cmp word [edi], si
je 0x40befb
inc esi
cmp word [edi + esi*2], 0
jne 0x40bef3
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.0046b90c
add esp, 4
mov dword [ebp - 0x2c], eax
test esi, esi
jle 0x40bf43
mov ecx, eax
sub edi, eax
mov edx, esi
nop word [eax + eax]
mov ax, word [edi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x40bf30
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 0x40bf71
cmp word [eax], si
je 0x40bf6e
inc esi
cmp word [eax + esi*2], 0
jne 0x40bf66
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x40bf91
xor eax, eax
test ecx, ecx
je 0x40bf8e
cmp word [ecx], ax
je 0x40bf8e
inc eax
cmp word [ecx + eax*2], 0
jne 0x40bf86
mov dword [ebp - 0x1c], eax
cmp esi, eax
jl 0x40bf99
mov esi, eax
jmp 0x40bfa0
xor edx, edx
test esi, esi
cmovs esi, edx
mov byte [ebp - 0x18], 1
test eax, eax
je 0x40bfd4
sub eax, esi
xor edx, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jle 0x40bfcb
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 0x40bfb5
xor edx, edx
mov word [ecx + eax*2], dx
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x40bff0
push 2
call fcn.0046b90c
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 0x49faa8
push ecx
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 3
call fcn.00403690
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0x50], edi
cmp edi, 2
jb 0x40c3a9
mov byte [ebp - 0x24], 1
test edi, edi
jne 0x40c04e
xor ecx, ecx
jmp 0x40c063
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 0x40c090
inc esi
cmp word [eax + esi*2], 0
jne 0x40c088
test ecx, ecx
je 0x40c0aa
xor eax, eax
cmp word [ecx], ax
je 0x40c0a8
nop dword [eax + eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x40c0a0
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.0046b90c
mov edx, eax
add esp, 4
mov eax, dword [ebp - 0x20]
mov ecx, edx
mov dword [ebp - 0x58], edx
test eax, eax
je 0x40c0f8
movzx edi, word [eax]
test di, di
je 0x40c0f8
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 0x40c0e4
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 0x40c12a
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 0x40c113
mov edi, dword [ebp - 0x50]
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x40c167
movzx eax, word [eax]
mov edi, eax
mov dword [ebp - 0x4c], edi
mov edi, dword [ebp - 0x50]
test ax, ax
je 0x40c167
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 0x40c150
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 0x40c17f
push eax
call fcn.0046b303
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 0x40c19f
push eax
call fcn.0046b303
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 0x40c37a
nop
test edi, edi
jne 0x40c1b8
xor eax, eax
jmp 0x40c1dd
cmp ecx, edi
jb 0x40c1d7
lea eax, [edi - 1]
cmp edi, eax
ja 0x40c1cc
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 0x40c1dd
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + ecx*4]
cmp word [eax], 0
je 0x40c306
test edi, edi
je 0x40c205
cmp ecx, edi
jb 0x40c1ff
lea ecx, [edi - 1]
cmp edi, ecx
ja 0x40c1ff
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 0x40c221
test edx, edx
je 0x40c21e
cmp word [edx], si
je 0x40c21e
inc esi
cmp word [edx + esi*2], 0
jne 0x40c216
mov dword [ebp - 0x1c], esi
xor eax, eax
nop dword [eax]
nop word [eax + eax]
lea eax, [eax + 1]
cmp word [eax*2 + 0x49faa8], 0
jne 0x40c230
lea ecx, [esi + eax]
mov dword [ebp - 0x4c], ecx
test edi, edi
je 0x40c25d
xor eax, eax
cmp word [edi], ax
je 0x40c258
nop
inc eax
cmp word [edi + eax*2], 0
jne 0x40c250
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.0046b90c
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x58], ecx
test eax, eax
je 0x40c2a1
movzx edx, word [eax]
test dx, dx
je 0x40c2a1
nop dword [eax]
mov word [ecx], dx
lea eax, [eax + 2]
movzx edx, word [eax]
add ecx, 2
test dx, dx
jne 0x40c290
mov esi, 0x49faa8
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 0x40c2b0
test edi, edi
je 0x40c2e1
movzx eax, word [edi]
mov edx, eax
test ax, ax
je 0x40c2e1
nop
mov word [ecx], ax
lea edi, [edi + 2]
movzx eax, word [edi]
add ecx, 2
test ax, ax
jne 0x40c2d0
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40c2f6
push eax
call fcn.0046b303
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 0x40c322
push 2
call fcn.0046b90c
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 0x40c361
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x40c350
push 2
call fcn.0046b90c
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 0x40c3a9
mov ecx, dword [ebp - 0x54]
mov edi, dword [ebp - 0x50]
inc ecx
mov dword [ebp - 0x54], ecx
cmp ecx, edi
jae 0x40c37a
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
jmp 0x40c1b0
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40c38a
push eax
call fcn.0046b303
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40c39a
push eax
call fcn.0046b303
add esp, 4
push dword [ebp - 0x2c]
call fcn.0046b303
add esp, 4
mov al, 1
jmp 0x40c3d6
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40c3b9
push eax
call fcn.0046b303
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40c3c9
push eax
call fcn.0046b303
add esp, 4
push dword [ebp - 0x2c]
call fcn.0046b303
add esp, 4
xor al, al
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 0x45], al
test ecx, ecx
je 0x40c3ec
push ecx
call fcn.0046b303
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.0046b2f5
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret