Function at 0x4046c0
Capabilities:
Create directory
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
je 0x4046dd
mov dword [ebp - 4], eax
jmp 0x4046e3
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], ecx
cmp dword [ebp + 0xc], ebx
mov esi, dword [ebp + 0xc]
jne 0x404706
cmp eax, ebx
lea esi, [ebp - 0x10]
jne 0x4046f9
xor edi, edi
jmp 0x40491b
mov eax, dword [ebp - 4]
push dword [eax]
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrcpyW]
mov eax, dword [esi]
xor edi, edi
cmp eax, ebx
je 0x404717
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, eax
mov ecx, dword [ebp - 4]
push 0x26c
call fcn.00435da9
push 0x2d0
mov ecx, esi
call fcn.00435da9
cmp edi, ebx
jg 0x40476f
push 0x208
push dword [esi]
push 0x494ec4
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
mov edi, eax
cmp edi, ebx
jg 0x404760
push 0x208
push dword [esi]
push 0x494eb8
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
mov edi, eax
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [esi]
inc edi
mov word [eax + edi*2], bx
push dword [esi]
call fcn.00419625
push dword [esi]
call fcn.0047f62b
test eax, eax
pop ecx
pop ecx
jne 0x4047ae
push ebx
push 0x24
push dword [esi]
push ebx
call dword [sym.imp.SHELL32.DLL_SHGetSpecialFolderPathW]
push 0x494ea8
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrcatW]
push dword [esi]
call fcn.00419625
pop ecx
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [esi]
mov eax, dword [ebp - 4]
push dword [eax]
call fcn.00404561
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.DLL_SetLastError]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], 0xc7
cmp dword [ebp + 8], ebx
je 0x40488a
mov eax, dword [ebp - 4]
mov eax, dword [eax]
lea eax, [eax + edi*2]
push 0x494e9c
mov dword [ebp - 0x18], eax
call fcn.00432a01
mov ebx, eax
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
add ebx, eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push 0x494e70
push dword [ebp - 0x18]
call dword [sym.imp.USER32.DLL_wsprintfW]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
add esp, 0x18
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
jne 0x404846
push ebx
push 5
mov ecx, 0x4acf10
call fcn.0040d358
dec dword [ebp - 8]
jns 0x4047d5
mov edi, dword [ebp - 0x1c]
jmp 0x4048fd
cmp dword [ebp + 0xc], ebx
mov dword [ebp - 0xc], 1
je 0x4046f2
mov eax, dword [ebp - 4]
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edi, eax
lea eax, [edi + 1]
push eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 4]
push dword [eax]
push dword [esi]
call fcn.00404561
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov edi, dword [ebp + 0xc]
mov eax, dword [esi]
add esp, 0xc
mov word [eax + edi*2], bx
lea eax, [edi + edi]
mov dword [ebp + 0xc], ebx
mov dword [ebp + 8], eax
push dword [ebp + 0x18]
mov edi, dword [esi]
push dword [ebp + 0xc]
add edi, dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push 0x494e44
push edi
call dword [sym.imp.USER32.DLL_wsprintfW]
mov eax, dword [esi]
add esp, 0x18
push ebx
push 0x80
push 1
push ebx
push ebx
push 0x40000000
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
call fcn.004045f9
mov edi, eax
cmp edi, ebx
jne 0x4048f8
push ebx
push 5
mov ecx, 0x4acf10
call fcn.0040d358
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0xc8
jl 0x404893
mov eax, dword [esi]
mov word [eax], bx
cmp dword [ebp - 0xc], ebx
jne 0x404905
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov word [eax], bx
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x404910
mov dword [eax], edi
jmp 0x40491b
cmp edi, ebx
je 0x40491b
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea ecx, [ebp - 0x10]
call fcn.0043092f
lea ecx, [ebp - 0x14]
call fcn.0043092f
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret