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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5730b9
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [0x5edd38]
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 0x471191
mov dword [ebp - 0x28c], eax
lea eax, [ebp - 0x264]
push eax
call fcn.004711c0
push 0x20a
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 1
push 0
push eax
call fcn.0053f340
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 0x470b89
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 0x470b70
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
jmp 0x470b98
xor eax, eax
push eax
mov word [ebp - 0x24c], ax
push 0x583afc
lea ecx, [ebp - 0x24c]
call fcn.00408f30
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 0x470c80
cmp dword [eax + 0x14], 8
jb 0x470bd5
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x24c]
call fcn.0040ddb0
cmp dword [ebp - 0x23c], 0
mov dword [ebp - 0x288], 0
je 0x470c80
lea eax, [ebp - 0x270]
mov dword [ebp - 0x268], 0
xorps xmm0, xmm0
push 1
push eax
movq qword [ebp - 0x270], xmm0
call fcn.004712a0
add esp, 8
test eax, eax
je 0x470c80
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 0x470c60
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x288], 0
cmp eax, 0xb7
jne 0x470c6a
mov dword [ebp - 0x288], 1
mov eax, dword [ebp - 0x26c]
test eax, eax
je 0x470c80
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [eax + eax]
mov edx, dword [ebp - 0x28c]
cmp word [edx], 0
je 0x4710f6
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 0x470cc0
sub ecx, dword [ebp - 0x284]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x234]
call fcn.00408f30
cmp dword [ebp - 0x254], 0
mov byte [ebp - 4], 3
je 0x470fe1
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 4
cmovae eax, dword [ebp - 0x234]
push 0x583b00
push 0
push dword [ebp - 0x224]
push eax
call fcn.0040fea0
add esp, 0x14
test eax, eax
jne 0x470df0
cmp dword [ebp - 0x288], eax
je 0x470df0
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.00410200
push 4
push str.TMP
lea ecx, [ebp - 0x27c]
call fcn.0040ddb0
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.0040ddb0
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 5
cmp eax, 8
jb 0x470dc4
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.0040a2e0
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 0x470fdd
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 5
cmovae eax, dword [ebp - 0x234]
push 0x583b18
push 0
push dword [ebp - 0x224]
push eax
call fcn.0040fea0
add esp, 0x14
test eax, eax
jne 0x470eef
cmp dword [ebp - 0x288], eax
je 0x470eef
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.00410200
push 5
push 0x583b24
lea ecx, [ebp - 0x27c]
call fcn.0040ddb0
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.0040ddb0
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 8
cmp eax, 8
jb 0x470ec3
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.0040a2e0
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 0x470fdd
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
push 0xd
cmovae eax, dword [ebp - 0x234]
push 0x583b30
push 0
push dword [ebp - 0x224]
push eax
call fcn.0040fea0
add esp, 0x14
test eax, eax
jne 0x470fe1
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.00410200
push 0xd
push str.LOCALAPPDATA
lea ecx, [ebp - 0x27c]
call fcn.0040ddb0
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.0040ddb0
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 0xb
cmp eax, 8
jb 0x470fb6
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.0040a2e0
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 0x471082
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 0x471057
mov cx, word [edi]
mov eax, dword [esi + 4]
mov word [ebp - 0x284], cx
cmp eax, dword [esi + 8]
je 0x47103d
mov word [eax], cx
add dword [esi + 4], 2
jmp 0x47104c
lea ecx, [ebp - 0x284]
push ecx
push eax
mov ecx, esi
call fcn.00471470
add edi, 2
cmp edi, dword [ebp - 0x290]
jne 0x471022
xor eax, eax
mov word [ebp - 0x282], ax
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
je 0x471073
xor ecx, ecx
mov word [eax], cx
add dword [esi + 4], 2
jmp 0x471082
lea ecx, [ebp - 0x282]
push ecx
push eax
mov ecx, esi
call fcn.00471470
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 0x4710e7
mov ecx, dword [ebp - 0x234]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 0xd
cmp edx, 0x1000
jb 0x4710d9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4711ae
push edx
push ecx
call fcn.00409f25
add esp, 8
mov byte [ebp - 4], 2
test edi, edi
je 0x4710f6
mov edi, dword [ebp - 0x280]
jmp 0x470c80
xor eax, eax
mov word [ebp - 0x282], ax
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
je 0x471112
xor ecx, ecx
mov word [eax], cx
add dword [esi + 4], 2
jmp 0x471121
lea ecx, [ebp - 0x282]
push ecx
push eax
mov ecx, esi
call fcn.00471470
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 0x47114f
inc eax
lea ecx, [ebp - 0x24c]
push eax
push dword [ebp - 0x24c]
call fcn.0040a2e0
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 0x471191
inc ecx
push ecx
push dword [ebp - 0x264]
lea ecx, [ebp - 0x264]
call fcn.0040a2e0
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.00401682
mov esp, ebp
pop ebp
ret
call fcn.0054223b
int3