Function at 0x10b6004
Capabilities:
Check if file exists
Create directory
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
push ebx
xor ecx, ecx
cmp word [eax + 0x8c], cx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], eax
je 0x10b6141
cmp word [0x10de1a8], cx
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, 0x104
jne 0x10b6059
push edi
push 0x10de1a8
push 0x1012cb8
call esi
push edi
push 0x10de3b0
push 0x10129fc
call esi
cmp word [0x10de9c8], 0
mov ebx, 0x1012c68
jne 0x10b6071
push edi
push 0x10de9c8
push ebx
call esi
cmp word [0x10de7c0], 0
jne 0x10b6091
push edi
push 0x10de7c0
push 0x1012be8
call esi
push edi
push 0x10de5b8
push ebx
call esi
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x7c]
mov ebx, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x10de7c6
push dword [eax + 0x18]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x10b60c3
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x7c]
push 0x10de9ce
push dword [eax + 0x18]
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x10b60cf
mov eax, dword [ebp - 0xc]
mov word [eax + 0x90], 1
cmp word [0x10debd0], 0
jne 0x10b60e6
push edi
push 0x10debd0
push 0x1012b58
call esi
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x7c]
push 0x10debd6
push dword [eax + 0x18]
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x10b6108
mov eax, dword [ebp - 0xc]
mov word [eax + 0x92], 1
cmp word [0x10dedd8], 0
jne 0x10b611f
push edi
push 0x10dedd8
push 0x1012af0
call esi
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x7c]
push 0x10dedde
push dword [eax + 0x18]
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x10b6141
mov eax, dword [ebp - 0xc]
mov word [eax + 0x94], 1
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0x28], 0xc
mov eax, dword [eax + 0x5c]
push 0x1010820
push dword [eax + 0x14]
call dword [sym.imp.msvcrt.dll_wcscmp]
mov edi, dword [ebp + 0xc]
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
mov ebx, eax
mov eax, dword [edi + 0x7c]
mov eax, dword [eax + 0x18]
neg ebx
sbb ebx, ebx
push 0x10de1ae
push eax
inc ebx
mov dword [ebp - 4], eax
call esi
add esp, 0x10
test eax, eax
jne 0x10b6198
mov dword [ebp - 4], 0x10de3b4
jmp 0x10b61bf
push 0x10de9ce
push dword [ebp - 4]
call esi
test eax, eax
pop ecx
pop ecx
je 0x10b61b8
push 0x10de7c6
push dword [ebp - 4]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10b61bf
mov dword [ebp - 4], 0x10de5bc
push 0x1011c26
push dword [ebp - 4]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10b61ef
mov esi, 0x1011c24
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
push esi
push dword [ebp + 8]
call fcn.0109b040
jmp 0x10b64b8
mov eax, dword [ebp - 4]
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
push eax
mov dword [ebp - 0x1c], eax
call esi
test eax, eax
pop ecx
je 0x10b6410
xor eax, eax
push eax
push eax
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.010a7a67
test ax, ax
jne 0x10b6444
mov ax, word [edi + 0x84]
test al, 0x11
jne 0x10b6250
test al, 2
je 0x10b6250
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
mov ecx, dword [ecx + 0x9c]
shr ecx, 0x16
and ecx, 1
push ecx
push 1
push 0
push eax
call fcn.0109987b
push dword [ebp - 4]
call esi
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 0x7c]
push dword [eax + 0x18]
call esi
push dword [ebp - 4]
mov dword [ebp - 0x18], eax
call esi
push dword [ebp - 4]
mov edi, eax
mov eax, dword [ebp - 0x18]
sub edi, eax
call esi
mov ecx, dword [ebp - 4]
movsx edi, di
add esp, 0x10
lea eax, [ecx + eax*2]
shl edi, 1
jmp 0x10b62d6
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10b62dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 0x10], 0
cmp eax, 0xb7
je 0x10b62dd
test bx, bx
jne 0x10b62ba
cmp eax, 5
jne 0x10b62ba
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10b62dd
push 0x5c
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll_wcsrchr]
test eax, eax
pop ecx
pop ecx
je 0x10b638c
and word [eax], 0
mov ecx, dword [ebp - 4]
lea edx, [edi + ecx]
cmp eax, edx
ja 0x10b6284
push dword [ebp - 4]
call esi
cmp ax, word [ebp - 0x14]
pop ecx
jae 0x10b6346
push dword [ebp - 4]
call esi
mov ecx, dword [ebp - 4]
mov word [ecx + eax*2], 0x5c
push dword [ebp - 4]
call esi
cmp ax, word [ebp - 0x14]
pop ecx
pop ecx
jne 0x10b6319
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x5c]
cmp dword [eax + 0x28], 0
je 0x10b6319
lea eax, [ebp - 0x28]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10b633f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x10b633f
push eax
call fcn.0109a2fe
mov dword [ebp - 8], eax
cmp word [ebp - 8], 0
je 0x10b62dd
cmp word [ebp - 8], 0
jne 0x10b6410
push 4
push 0x1004284
push dword [ebp + 8]
call fcn.0109b040
test ax, ax
mov dword [ebp - 8], eax
jne 0x10b63cb
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x7c]
mov edi, dword [eax + 0x18]
mov ebx, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x10de1ae
push edi
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x10b6395
mov edi, 0x10de3b6
jmp 0x10b63b6
mov dword [ebp - 8], 0xfffffe05
jmp 0x10b6410
push 0x10de9ce
push edi
call ebx
test eax, eax
pop ecx
pop ecx
je 0x10b63b1
push 0x10de7c6
push edi
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x10b63b6
mov edi, 0x10de5be
push edi
call esi
pop ecx
lea eax, [eax + eax + 2]
push eax
push edi
push dword [ebp + 8]
call fcn.0109b0e1
mov dword [ebp - 8], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, 0x4000
test ecx, eax
je 0x10b63e6
mov eax, dword [ebp - 0xc]
mov word [eax + 0x30], 1
mov eax, dword [ebp + 0xc]
test dword [eax + 0x40], ecx
je 0x10b63ff
test byte [eax + 0x16], 2
jne 0x10b6410
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_EncryptFileW]
jmp 0x10b6410
test byte [eax + 0x16], 2
jne 0x10b6410
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_DecryptFileW]
push dword [ebp + 8]
call fcn.010a7422
xor edi, edi
cmp word [ebp - 8], di
je 0x10b64b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push 1
mov ebx, eax
lea eax, [ebp - 4]
push eax
push edi
push dword [ebp - 0x1c]
push dword [ebp + 8]
call fcn.010a7a67
test ax, ax
je 0x10b644a
or ax, 0xffff
jmp 0x10b64b8
mov esi, dword [sym.imp.msvcrt.dll_wcsncmp]
push 8
push 0x1011d74
push dword [ebp - 4]
call esi
add esp, 0xc
test eax, eax
jne 0x10b6472
add dword [ebp - 4], 0xc
mov eax, dword [ebp - 4]
mov dword [eax], 0x5c005c
jmp 0x10b6489
push 4
push 0x1005e34
push dword [ebp - 4]
call esi
add esp, 0xc
test eax, eax
jne 0x10b6489
add dword [ebp - 4], 8
push dword [ebp - 4]
push 0x232f
push ebx
push edi
push dword [ebp + 8]
call fcn.0107f1b8
push dword [ebp + 8]
call fcn.010a7422
xor eax, eax
cmp word [ebp - 8], 0xfe30
sete al
add eax, 0xfffffe3f
jmp 0x10b64b8
xor ax, ax
pop edi
pop esi
pop ebx
leave
ret 8