Function at 0x470450
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d9180
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
push ebx
push esi
mov esi, ecx
push edi
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x10], esp
call fcn.004c70e0
test eax, eax
je 0x470736
mov ecx, dword [ebp + 8]
xor edx, edx
mov ebx, ecx
shr ebx, 4
mov eax, ebx
div dword [esi + 0xc]
mov eax, dword [esi + 8]
test eax, eax
je 0x4704bb
mov eax, dword [eax + edx*4]
test eax, eax
je 0x4704bb
cmp dword [eax + 8], ecx
je 0x4704ad
mov eax, dword [eax]
test eax, eax
jne 0x4704a0
jmp 0x4704bb
test eax, eax
je 0x4704bb
mov eax, dword [eax + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [0x510634]
mov dword [ebp - 0x18], eax
push 0x104
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.004a9599
push eax
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.004a95e8
mov ecx, dword [0x510634]
mov dword [ebp - 0x14], ecx
mov edi, dword [ebp - 0x18]
push 0x104
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004a9599
push eax
push 0
push 0x5154bc
push edi
call dword [sym.imp.KERNEL32.DLL_GetTempFileNameA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.004a95e8
mov edx, dword [ebp - 0x14]
push 0
push 0x4000100
push 2
push 0
push 0
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x1c], edi
je 0x47071b
push edi
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.004ab10b
push 0
push 0x1000
lea eax, [ebp - 0x38]
push 0
push eax
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 3
call fcn.004ada29
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x7c]
push eax
mov byte [ebp - 4], 4
mov edx, dword [ecx]
call dword [edx + 8]
lea ecx, [ebp - 0x7c]
call fcn.004add3a
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 3
call fcn.004adb05
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.004ab12a
mov eax, ebx
xor edx, edx
div dword [esi + 0xc]
mov eax, dword [esi + 8]
mov dword [ebp - 4], 1
test eax, eax
mov ebx, edx
mov dword [ebp + 0xc], ebx
je 0x4705de
mov eax, dword [eax + ebx*4]
test eax, eax
je 0x4705de
mov ecx, dword [eax + 8]
mov edx, dword [ebp + 8]
cmp ecx, edx
je 0x4705d6
mov eax, dword [eax]
test eax, eax
jne 0x4705c4
jmp 0x4705de
test eax, eax
jne 0x47069d
mov eax, dword [esi + 8]
test eax, eax
jne 0x470617
mov ebx, dword [esi + 0xc]
lea edi, [ebx*4]
push edi
call fcn.004a8eaa
mov edx, eax
mov ecx, edi
mov dword [esi + 8], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [esi + 0xc], ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x47064e
mov eax, dword [esi + 0x1c]
push 0x10
lea ecx, [esi + 0x18]
push eax
push ecx
call fcn.004a468c
mov ecx, dword [esi + 0x1c]
mov edx, ecx
shl edx, 4
dec ecx
test ecx, ecx
lea eax, [edx + eax - 0xc]
jl 0x47064e
mov edx, dword [esi + 0x14]
dec ecx
mov dword [eax], edx
mov dword [esi + 0x14], eax
sub eax, 0x10
test ecx, ecx
jge 0x47063e
mov eax, dword [esi + 0x14]
mov ecx, dword [eax]
lea edx, [eax + 8]
mov dword [esi + 0x14], ecx
mov ecx, dword [esi + 0x10]
inc ecx
mov dword [esi + 0x10], ecx
mov dword [edx], 0
xor ecx, ecx
add edx, 4
mov edi, ecx
dec ecx
test edi, edi
jne 0x470668
lea edx, [eax + 0xc]
xor ecx, ecx
mov dword [edx], edi
add edx, 4
mov edi, ecx
dec ecx
test edi, edi
jne 0x470679
mov edx, dword [ebp + 8]
mov dword [eax + 4], ebx
mov dword [eax + 8], edx
mov ecx, dword [esi + 8]
mov edi, dword [ebp - 0x1c]
mov edx, dword [ecx + ebx*4]
mov dword [eax], edx
mov ecx, dword [esi + 8]
mov dword [ecx + ebx*4], eax
lea ecx, [ebp - 0x14]
mov dword [eax + 0xc], edi
mov byte [ebp - 4], 0
call fcn.004a9169
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.004a9169
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.004a9169
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.004a9169
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8