Function at 0x406460
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51fc3b
mov eax, dword fs:[0]
push eax
sub esp, 0x660
mov eax, dword [0x579ec0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x660], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x63c], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x634], ecx
xor ebx, ebx
mov dword [ebp - 0x638], ebx
push eax
lea ecx, [ebp - 0x630]
call fcn.00406390
mov dword [ebp - 4], ebx
push str.uninst.lst
lea ecx, [ebp - 0x630]
call fcn.00404d50
mov byte [ebp - 4], 1
push 0x52ef98
push 0x83
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x644], eax
cmp eax, ebx
jne 0x406506
mov dword [ebp - 0x650], ebx
push 0x562e10
lea edx, [ebp - 0x650]
push edx
call fcn.0050670a
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
jne 0x40652d
mov dword [ebp - 0x664], 1
push 0x562e10
lea eax, [ebp - 0x664]
push eax
call fcn.0050670a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x64c], eax
cmp eax, ebx
jne 0x406559
mov dword [ebp - 0x658], 2
push 0x562e10
lea ecx, [ebp - 0x658]
push ecx
call fcn.0050670a
push 0x52fd30
mov edx, dword [ebp - 0x630]
push edx
call fcn.00507362
add esp, 8
mov edi, eax
mov dword [ebp - 0x65c], edi
cmp edi, ebx
jne 0x406594
mov dword [ebp - 0x648], 3
push 0x562e10
lea eax, [ebp - 0x648]
push eax
call fcn.0050670a
lea ecx, [ebp - 0x62c]
push ecx
push 0x30c
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x62c]
add eax, 0xfffffffe
nop
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x4065b0
mov edx, dword [str.UnInst.uil]
mov dword [eax], edx
mov ecx, dword [0x52fd1c]
mov dword [eax + 4], ecx
mov edx, dword [0x52fd20]
mov dword [eax + 8], edx
mov ecx, dword [0x52fd24]
mov dword [eax + 0xc], ecx
mov edx, dword [0x52fd28]
mov dword [eax + 0x10], edx
mov cx, word [0x52fd2c]
mov word [eax + 0x14], cx
push 0x52fd10
lea edx, [ebp - 0x62c]
push edx
call fcn.00507362
add esp, 8
mov esi, eax
mov dword [ebp - 0x654], esi
cmp esi, ebx
jne 0x40662e
mov dword [ebp - 0x668], 4
push 0x562e10
lea eax, [ebp - 0x668]
push eax
call fcn.0050670a
lea ecx, [ebp - 0x62c]
mov edx, dword [ebp - 0x634]
lea ebx, [ebx]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x406640
mov ecx, dword [ebp - 0x634]
push ecx
mov edx, dword [ebp - 0x630]
push edx
mov eax, dword [ebp - 0x63c]
push eax
push esi
push edi
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp - 0x660]
call fcn.00405ab0
test eax, eax
je 0x406696
mov dword [ebp - 0x640], 5
push 0x562e10
lea edx, [ebp - 0x640]
push edx
call fcn.0050670a
push esi
mov eax, dword [ebp - 0x644]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push 1
mov ecx, dword [ebp - 0x64c]
push ecx
call fcn.00506c40
push edi
call fcn.00506ec3
push esi
call fcn.00506ec3
add esp, 0x18
mov dword [ebp - 4], ebx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x630]
call fcn.00404820
mov eax, dword [ebp - 0x638]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0050629a
mov esp, ebp
pop ebp
ret 0xc