Function at 0x401390
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459911
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x486850]
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 edi, ecx
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
test edx, edx
jne 0x4013cf
mov edx, 0x468378
xor eax, eax
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
cmp word [edx], ax
jne 0x4013f5
xor ecx, ecx
jmp 0x40140f
mov ecx, edx
lea esi, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401400
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x234]
call fcn.00402900
mov dword [ebp - 4], 0
cmp dword [ebp - 0x224], 0
jne 0x4014ee
lea ecx, [ebp - 0x264]
call fcn.00401100
push 0x487a00
mov edx, eax
lea ecx, [ebp - 0x24c]
mov byte [ebp - 4], 1
call fcn.00401e00
mov esi, eax
lea eax, [ebp - 0x234]
add esp, 4
cmp eax, esi
je 0x4014a0
cmp dword [ebp - 0x220], 8
jb 0x401477
push dword [ebp - 0x234]
call fcn.0043d3af
add esp, 4
xor eax, eax
push esi
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
call fcn.004022d0
cmp dword [ebp - 0x238], 8
jb 0x4014b7
push dword [ebp - 0x24c]
call fcn.0043d3af
add esp, 4
xor eax, eax
mov byte [ebp - 4], al
cmp dword [ebp - 0x250], 8
mov dword [ebp - 0x238], 7
mov dword [ebp - 0x23c], 0
mov word [ebp - 0x24c], ax
jb 0x4014ee
push dword [ebp - 0x264]
call fcn.0043d3af
add esp, 4
cmp dword [ebp - 0x220], 8
mov eax, dword [ebp - 0x234]
jae 0x401503
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi + 0x2c], eax
test eax, eax
je 0x4016e4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.AvgRLInitialization5
push eax
call esi
push str.AvgRLDestroy
push dword [edi + 0x2c]
mov dword [edi], eax
call esi
push str.AvgRLGetMachineId
push dword [edi + 0x2c]
mov dword [edi + 4], eax
call esi
push str.AvgRLEventReport5
push dword [edi + 0x2c]
mov dword [edi + 8], eax
call esi
push str.AvgRLSetLicense5
push dword [edi + 0x2c]
mov dword [edi + 0xc], eax
call esi
cmp dword [edi], 0
mov dword [edi + 0x10], eax
je 0x4016cb
cmp dword [edi + 4], 0
je 0x4016cb
cmp dword [edi + 8], 0
je 0x4016cb
cmp dword [edi + 0xc], 0
je 0x4016cb
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.00444380
add esp, 0xc
lea ecx, [ebp - 0x24c]
push 0x468378
call fcn.00402a00
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0x23
push 0
mov byte [ebp - 4], 2
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x401656
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x24c]
call fcn.004019b0
push 0x468374
lea ecx, [ebp - 0x24c]
call fcn.00401a00
push str.AVGAWL
lea ecx, [ebp - 0x24c]
call fcn.00401a00
cmp byte [ebp + 0x14], 0
je 0x401646
push str.TEMP
lea eax, [ebp - 0x268]
push 0
push eax
mov dword [ebp - 0x268], 0
call fcn.0043db9e
add esp, 0xc
lea ecx, [ebp - 0x24c]
push dword [ebp - 0x268]
call fcn.004019b0
push dword [ebp - 0x268]
call fcn.0043dd0d
add esp, 4
push str.AvgRep.xml
lea ecx, [ebp - 0x24c]
call fcn.00401a00
cmp dword [ebp - 0x238], 8
mov eax, dword [ebp - 0x24c]
jae 0x40166b
lea eax, [ebp - 0x24c]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push 0x4682ac
push eax
mov eax, dword [edi]
call eax
test eax, eax
js 0x4016a5
lea ecx, [ebp - 0x24c]
mov byte [edi + 0x30], 1
mov byte [ebp - 4], 0
call fcn.004023c0
push ecx
mov ecx, edi
call fcn.00401840
jmp 0x4016f3
push str.AvgRLInitializationError
lea ecx, [edi + 0x14]
call fcn.004019b0
lea ecx, [ebp - 0x24c]
mov byte [ebp - 4], 0
call fcn.004023c0
push ecx
mov ecx, edi
call fcn.00401840
jmp 0x4016f3
push 0x14
push str.CanNotGetProcAddress
lea ecx, [edi + 0x14]
call fcn.00402900
push ecx
mov ecx, edi
call fcn.00401840
jmp 0x4016f3
push 0xd
push str.CanNotLoadLib
lea ecx, [edi + 0x14]
call fcn.00402900
cmp dword [ebp - 0x220], 8
jb 0x40170a
push dword [ebp - 0x234]
call fcn.0043d3af
add esp, 4
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.0043d3b4
mov esp, ebp
pop ebp
ret 0x14