Function at 0x46ec50
Capabilities:
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4b3b1c
push eax
mov eax, dword [0x4fa34c]
mov dword fs:[0], esp
sub esp, 0x828
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
jne 0x46ecc2
mov ecx, dword [0x4fa140]
mov eax, 1
cmp ecx, ebx
mov dword [0x4fa34c], eax
jne 0x46eca1
push 0x104
push 0x4fa144
mov dword [0x4fa140], eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x4fa144
push 0x4fa350
call fcn.00438893
push str.Ocular
push 0x4fa350
call fcn.00438869
add esp, 0x10
push 0x4fa350
lea ecx, [esp + 0xc]
call fcn.00447770
push 0x4e2014
lea ecx, [esp + 0xc]
mov dword [esp + 0x83c], ebx
call fcn.00448270
push str.OAgent.ini
lea ecx, [esp + 0xc]
call fcn.00448270
mov eax, dword [0x4bc794]
mov dword [esp + 0xc], eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x838], 1
call fcn.004a1ebd
mov ecx, dword [esp + 8]
push ebx
lea edx, [esp + 0x10]
push ecx
push edx
push 0x4f08c8
push str.AgentConfig
mov byte [esp + 0x84c], 2
call fcn.00488490
mov eax, dword [esp + 0x20]
add esp, 0x14
cmp dword [eax - 8], ebx
je 0x46ed4a
lea ecx, [esp + 0x1c]
push ebx
push ecx
push eax
call fcn.0047c9d0
add esp, 0xc
lea ecx, [esp + 0x14]
call fcn.00487960
push 0x20019
push str.SOFTWAREClassesCLSIDAFFAEF68_CDC5_4aad_9D3F_997C0D55927BProgID
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x20]
mov byte [esp + 0x844], 3
call fcn.0044a560
test eax, eax
je 0x46edec
mov eax, dword [esp + 0x24]
push ebp
cmp eax, ebx
jne 0x46ede2
lea edx, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
push 0x4f08c8
mov dword [esp + 0x1c], ebx
call fcn.00487ba0
mov ebp, eax
cmp ebp, ebx
je 0x46ede2
mov eax, dword [esp + 0x14]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x28]
call fcn.004a1f1d
mov edi, dword [esp + 0x24]
cmp edi, ebx
je 0x46edcd
mov ecx, dword [esp + 0x14]
push esi
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x46edd9
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x28]
call fcn.004a1f1d
push ebp
call fcn.004a299c
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00487a50
pop ebp
mov edx, dword [esp + 0x24]
cmp edx, ebx
jne 0x46ee50
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x32]
mov word [esp + 0x30], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x30]
push 0x400
push eax
push ebx
push 0x4f08c8
push str.ED30_8AC4_11D5_8930_A730
call dword [sym.imp.KERNEL32.dll_GetProfileStringW]
cmp eax, ebx
jbe 0x46ee44
cmp word [esp + 0x82e], bx
jne 0x46ee44
lea ecx, [esp + 0x1c]
push ebx
lea edx, [esp + 0x34]
push ecx
push edx
call fcn.0047c9d0
add esp, 0xc
mov edx, dword [esp + 0x24]
cmp edx, ebx
je 0x46eef8
cmp edx, 4
jbe 0x46eef8
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x46eef8
cmp dword [eax], 1
je 0x46eef8
add eax, 4
xor ecx, ecx
mov cx, word [eax + 0x18]
lea ecx, [ecx + ecx + 0x22]
cmp ecx, ebx
je 0x46eef8
add edx, 0xfffffffc
cmp ecx, edx
ja 0x46eef8
cmp eax, ebx
je 0x46eef8
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x840]
lea ecx, [esp + 0x14]
mov byte [esp + 0x838], 2
mov dword [eax], edx
call fcn.00487a50
lea ecx, [esp + 0x1c]
mov byte [esp + 0x838], 1
call fcn.004a1ef0
lea ecx, [esp + 0xc]
mov byte [esp + 0x838], bl
call fcn.00447cd0
lea ecx, [esp + 8]
mov dword [esp + 0x838], 0xffffffff
call fcn.00447cd0
pop edi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x828]
mov dword fs:[0], ecx
add esp, 0x834
ret
lea ecx, [esp + 0x14]
mov byte [esp + 0x838], 2
call fcn.00487a50
lea ecx, [esp + 0x1c]
mov byte [esp + 0x838], 1
call fcn.004a1ef0
lea ecx, [esp + 0xc]
mov byte [esp + 0x838], bl
call fcn.00447cd0
lea ecx, [esp + 8]
mov dword [esp + 0x838], 0xffffffff
call fcn.00447cd0
mov ecx, dword [esp + 0x830]
pop edi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x834
ret