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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a0dc9
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [0x62cf50]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x298], esi
mov dword [ebp - 0x280], 0
movq qword [esi], xmm0
mov dword [esi + 8], 0
mov dword [ebp - 0x284], eax
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x280], 1
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov dword [ebp - 0x294], eax
test eax, eax
je 0x4787c1
mov dword [ebp - 0x28c], eax
lea eax, [ebp - 0x264]
push eax
call fcn.004787f0
push 0x20a
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 1
push 0
push eax
call fcn.0056aed0
add esp, 0x10
lea eax, [ebp - 0x21c]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 7
test eax, eax
je 0x4781b9
xor eax, eax
lea ecx, [ebp - 0x21c]
mov word [ebp - 0x24c], ax
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4781a0
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
jmp 0x4781c8
xor eax, eax
push eax
mov word [ebp - 0x24c], ax
push 0x5b44c8
lea ecx, [ebp - 0x24c]
call fcn.00409db0
mov edi, 5
mov dword [ebp - 0x280], edi
mov eax, dword [ebp - 0x284]
mov byte [ebp - 4], 2
mov dword [ebp - 0x288], 0
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x4782b0
cmp dword [eax + 0x14], 8
jb 0x478205
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x24c]
call fcn.0040f730
cmp dword [ebp - 0x23c], 0
mov dword [ebp - 0x288], 0
je 0x4782b0
lea eax, [ebp - 0x270]
mov dword [ebp - 0x268], 0
xorps xmm0, xmm0
push 1
push eax
movq qword [ebp - 0x270], xmm0
call fcn.004788d0
add esp, 8
test eax, eax
je 0x4782b0
cmp dword [ebp - 0x238], 8
lea ecx, [ebp - 0x270]
lea eax, [ebp - 0x24c]
cmovae eax, dword [ebp - 0x24c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x478290
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x288], 0
cmp eax, 0xb7
jne 0x47829a
mov dword [ebp - 0x288], 1
mov eax, dword [ebp - 0x26c]
test eax, eax
je 0x4782b0
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [eax + eax]
mov edx, dword [ebp - 0x28c]
cmp word [edx], 0
je 0x478726
mov ecx, edx
mov dword [ebp - 0x224], 0
xor eax, eax
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
lea eax, [ecx + 2]
mov dword [ebp - 0x284], eax
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4782f0
sub ecx, dword [ebp - 0x284]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x234]
call fcn.00409db0
cmp dword [ebp - 0x254], 0
mov byte [ebp - 4], 3
je 0x478611
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 4
cmovae eax, dword [ebp - 0x234]
push 0x5b44cc
push 0
push dword [ebp - 0x224]
push eax
call fcn.00411900
add esp, 0x14
test eax, eax
jne 0x478420
cmp dword [ebp - 0x288], eax
je 0x478420
mov dword [ebp - 0x26c], eax
lea ecx, [ebp - 0x27c]
mov word [ebp - 0x27c], ax
or edi, 8
mov eax, dword [ebp - 0x23c]
add eax, 4
mov byte [ebp - 4], 4
push eax
mov dword [ebp - 0x268], 7
mov dword [ebp - 0x280], edi
call fcn.00413ce0
push 4
push str.TMP
lea ecx, [ebp - 0x27c]
call fcn.0040f730
cmp dword [ebp - 0x238], 8
lea eax, [ebp - 0x24c]
push dword [ebp - 0x23c]
cmovae eax, dword [ebp - 0x24c]
lea ecx, [ebp - 0x27c]
push eax
call fcn.0040f730
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 5
cmp eax, 8
jb 0x4783f4
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.0040a5e0
movups xmm0, xmmword [ebp - 0x27c]
and edi, 0xfffffff7
mov dword [ebp - 0x280], edi
movups xmmword [ebp - 0x234], xmm0
movq xmm0, qword [ebp - 0x26c]
movq qword [ebp - 0x224], xmm0
jmp 0x47860d
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 5
cmovae eax, dword [ebp - 0x234]
push 0x5b44e4
push 0
push dword [ebp - 0x224]
push eax
call fcn.00411900
add esp, 0x14
test eax, eax
jne 0x47851f
cmp dword [ebp - 0x288], eax
je 0x47851f
mov dword [ebp - 0x26c], eax
lea ecx, [ebp - 0x27c]
mov word [ebp - 0x27c], ax
or edi, 0x10
mov eax, dword [ebp - 0x23c]
add eax, 5
mov byte [ebp - 4], 7
push eax
mov dword [ebp - 0x268], 7
mov dword [ebp - 0x280], edi
call fcn.00413ce0
push 5
push 0x5b44f0
lea ecx, [ebp - 0x27c]
call fcn.0040f730
cmp dword [ebp - 0x238], 8
lea eax, [ebp - 0x24c]
push dword [ebp - 0x23c]
cmovae eax, dword [ebp - 0x24c]
lea ecx, [ebp - 0x27c]
push eax
call fcn.0040f730
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 8
cmp eax, 8
jb 0x4784f3
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.0040a5e0
movups xmm0, xmmword [ebp - 0x27c]
and edi, 0xffffffef
mov dword [ebp - 0x280], edi
movups xmmword [ebp - 0x234], xmm0
movq xmm0, qword [ebp - 0x26c]
movq qword [ebp - 0x224], xmm0
jmp 0x47860d
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 0xd
cmovae eax, dword [ebp - 0x234]
push 0x5b44fc
push 0
push dword [ebp - 0x224]
push eax
call fcn.00411900
add esp, 0x14
test eax, eax
jne 0x478611
mov dword [ebp - 0x26c], eax
lea ecx, [ebp - 0x27c]
mov word [ebp - 0x27c], ax
or edi, 0x20
mov eax, dword [ebp - 0x254]
add eax, 0xd
mov byte [ebp - 4], 0xa
push eax
mov dword [ebp - 0x268], 7
mov dword [ebp - 0x280], edi
call fcn.00413ce0
push 0xd
push str.LOCALAPPDATA
lea ecx, [ebp - 0x27c]
call fcn.0040f730
cmp dword [ebp - 0x250], 8
lea eax, [ebp - 0x264]
push dword [ebp - 0x254]
cmovae eax, dword [ebp - 0x264]
lea ecx, [ebp - 0x27c]
push eax
call fcn.0040f730
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 0xb
cmp eax, 8
jb 0x4785e6
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.0040a5e0
movups xmm0, xmmword [ebp - 0x27c]
and edi, 0xffffffdf
mov dword [ebp - 0x280], edi
movups xmmword [ebp - 0x234], xmm0
movq xmm0, qword [ebp - 0x26c]
movq qword [ebp - 0x224], xmm0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x224], 0
je 0x4786b2
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
mov ecx, dword [ebp - 0x224]
lea edi, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
cmovae edi, dword [ebp - 0x234]
lea eax, [eax + ecx*2]
mov dword [ebp - 0x290], eax
cmp edi, eax
je 0x478687
mov cx, word [edi]
mov eax, dword [esi + 4]
mov word [ebp - 0x284], cx
cmp eax, dword [esi + 8]
je 0x47866d
mov word [eax], cx
add dword [esi + 4], 2
jmp 0x47867c
lea ecx, [ebp - 0x284]
push ecx
push eax
mov ecx, esi
call fcn.00478aa0
add edi, 2
cmp edi, dword [ebp - 0x290]
jne 0x478652
xor eax, eax
mov word [ebp - 0x282], ax
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
je 0x4786a3
xor ecx, ecx
mov word [eax], cx
add dword [esi + 4], 2
jmp 0x4786b2
lea ecx, [ebp - 0x282]
push ecx
push eax
mov ecx, esi
call fcn.00478aa0
mov edi, dword [ebp - 0x28c]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp - 0x220]
mov byte [ebp - 4], 2
lea edi, [edi + eax*2]
add edi, 2
mov dword [ebp - 0x28c], edi
cmp edx, 8
jb 0x478717
mov ecx, dword [ebp - 0x234]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 0xd
cmp edx, 0x1000
jb 0x478709
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4787de
push edx
push ecx
call fcn.0040a1a2
add esp, 8
mov byte [ebp - 4], 2
test edi, edi
je 0x478726
mov edi, dword [ebp - 0x280]
jmp 0x4782b0
xor eax, eax
mov word [ebp - 0x282], ax
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
je 0x478742
xor ecx, ecx
mov word [eax], cx
add dword [esi + 4], 2
jmp 0x478751
lea ecx, [ebp - 0x282]
push ecx
push eax
mov ecx, esi
call fcn.00478aa0
push dword [ebp - 0x294]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, dword [ebp - 0x238]
mov byte [ebp - 4], 0xe
cmp eax, 8
jb 0x47877f
inc eax
lea ecx, [ebp - 0x24c]
push eax
push dword [ebp - 0x24c]
call fcn.0040a5e0
xor eax, eax
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 7
mov word [ebp - 0x24c], ax
mov ecx, dword [ebp - 0x250]
mov dword [ebp - 4], 0xf
cmp ecx, 8
jb 0x4787c1
inc ecx
push ecx
push dword [ebp - 0x264]
lea ecx, [ebp - 0x264]
call fcn.0040a5e0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004016cd
mov esp, ebp
pop ebp
ret
call fcn.0056e2db
int3