Function at 0x402f50
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4609eb
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x4770c0]
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, ecx
lea eax, [ebp - 0x230]
mov byte [ebp - 0x231], 0
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, 0x104
jbe 0x402fcf
mov edx, str.Insufficient_buffer_size_for_temp_path_n
mov ecx, 0x478558
call fcn.00409650
mov al, byte [ebp - 0x231]
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.0043a25b
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x4031ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea esi, [ebp - 0x13]
mov dword [ebp - 0x238], ecx
mov eax, 0xcccccccd
dec esi
mul ecx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
mov eax, dword [ebp - 0x238]
add cl, cl
sub al, cl
mov ecx, edx
add al, 0x30
mov byte [esi], al
mov eax, edx
mov dword [ebp - 0x238], eax
test eax, eax
jne 0x402fe8
push ecx
lea eax, [ebp - 0x13]
push eax
push esi
lea ecx, [ebp - 0x268]
call fcn.0040bcc0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x254]
mov eax, edx
mov ecx, dword [ebp - 0x258]
sub eax, ecx
cmp eax, 0x24
jb 0x4030cb
cmp edx, 0xf
lea esi, [ebp - 0x268]
lea eax, [ecx + 0x24]
cmova esi, dword [ebp - 0x268]
mov dword [ebp - 0x258], eax
cmp esi, 0x4721e0
jae 0x403089
lea eax, [esi + ecx]
cmp eax, str.Unable_to_get_temp_path__error_code
jb 0x403089
cmp esi, str.Unable_to_get_temp_path__error_code
ja 0x40307f
xor edi, edi
jmp 0x40308e
mov edi, esi
sub edi, str.Unable_to_get_temp_path__error_code
jmp 0x40308e
mov edi, 0x24
lea eax, [ecx + 1]
push eax
lea ecx, [esi + 0x24]
push esi
push ecx
call fcn.0043b9d0
push edi
push str.Unable_to_get_temp_path__error_code
push esi
call fcn.0043b9d0
mov edx, 0x24
lea ecx, [edi + 0x4721e0]
sub edx, edi
lea eax, [esi + edi]
push edx
push ecx
push eax
call fcn.0043b9d0
add esp, 0x24
lea eax, [ebp - 0x268]
jmp 0x4030e3
push 0x24
sub esp, 8
lea ecx, [ebp - 0x268]
push dword [ebp - 0x238]
push 0x24
call fcn.0040c290
mov dword [ebp - 0x240], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x250], xmm0
mov dword [ebp - 0x23c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x250], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x240], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x250]
cmp dword [ebp - 0x23c], 0xf
mov ecx, 0x478558
push dword [ebp - 0x240]
cmova edx, dword [ebp - 0x250]
call fcn.0040bde0
add esp, 4
mov ecx, eax
call fcn.00409900
mov ecx, dword [ebp - 0x23c]
cmp ecx, 0xf
jbe 0x403195
mov edx, dword [ebp - 0x250]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40318b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40325f
push ecx
push edx
call fcn.0043a5cf
add esp, 8
mov ecx, dword [ebp - 0x254]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0xf
mov byte [ebp - 0x250], 0
cmp ecx, 0xf
jbe 0x402fae
mov edx, dword [ebp - 0x268]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4031e0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40325f
push ecx
push edx
call fcn.0043a5cf
add esp, 8
jmp 0x402fae
lea ecx, [ebp - 0x230]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403200
mov eax, dword [esi + 0x14]
sub ecx, edx
sar ecx, 1
cmp ecx, eax
ja 0x403243
mov edi, esi
cmp eax, 7
jbe 0x40321f
mov edi, dword [esi]
mov dword [esi + 0x10], ecx
lea eax, [ebp - 0x230]
lea esi, [ecx + ecx]
push esi
push eax
push edi
call fcn.0043b9d0
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
mov al, 1
jmp 0x402fb4
lea eax, [ebp - 0x230]
push eax
push dword [ebp - 0x238]
push ecx
mov ecx, esi
call fcn.0040a5d0
mov al, 1
jmp 0x402fb4
call fcn.004430c5
int3