Function at 0x4a0850
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a6ab8
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x639354]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor eax, eax
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
push 0x40
mov dword [ebp - 4], eax
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x24c], eax
call fcn.0055c4f4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x250], eax
push str.office6_
lea eax, [ebp - 0x258]
mov byte [ebp - 4], 1
push esi
push eax
call fcn.00429810
add esp, 0x10
mov ebx, eax
mov byte [ebp - 4], 3
call fcn.00429250
mov ecx, eax
test ecx, ecx
je 0x4a0cc1
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x254], eax
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 4
push 0
push eax
call fcn.00560a80
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a0950
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x254]
call fcn.0042a060
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edx, dword [ebp - 0x258]
or ebx, 0xffffffff
mov byte [ebp - 4], 6
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4a099e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword fs:[0x2c]
mov ecx, dword [0x643da0]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x641f60]
cmp eax, dword [ecx + 4]
jg 0x4a0ccb
mov ecx, dword [0x641f5c]
test ecx, ecx
jne 0x4a0a3b
mov eax, dword [ebp - 0x230]
mov esi, dword [ebp - 0x254]
mov dword [edi], ecx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], ecx
mov dword [edi], eax
mov eax, dword [ebp - 0x22c]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x228]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x224]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x220]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x21c]
mov dword [edi + 0x14], eax
cmp dword [esi - 0xc], ecx
je 0x4a0a18
mov eax, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
call eax
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4a0a2d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x250]
push dword [eax + 4]
jmp 0x4a0c85
mov eax, dword [ecx]
lea edx, [ebp - 0x264]
push 0
push edx
call dword [eax]
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x258], eax
cmp ecx, eax
je 0x4a0aa3
mov esi, dword [ebp - 0x250]
mov eax, ecx
push dword [esi + 4]
push eax
call fcn.00440bd0
mov edx, dword [ebp - 0x258]
mov dword [esi + 4], esi
mov dword [esi], esi
mov dword [esi + 8], esi
mov ecx, dword [ebp - 0x250]
mov dword [ebp - 0x24c], 0
mov eax, dword [edx]
mov dword [ebp - 0x250], eax
mov eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [ebp - 0x24c]
mov dword [ebp - 0x24c], eax
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x264]
push dword [eax + 4]
lea eax, [ebp - 0x264]
push eax
mov ecx, eax
call fcn.00440bd0
push 0x40
push dword [ebp - 0x264]
call fcn.0055c524
mov esi, dword [ebp - 0x254]
add esp, 8
mov byte [ebp - 4], 1
cmp dword [esi - 0xc], 0
je 0x4a0ae2
mov eax, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
call eax
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4a0af7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 6
push str.cookie
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 7
call fcn.0042e330
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x268]
push eax
lea ecx, [ebp - 0x250]
call fcn.00440c70
mov eax, dword [ebp - 0x260]
mov esi, dword [ebp - 0x250]
mov ebx, dword [ebp - 0x248]
mov dword [ebp - 0x258], eax
cmp byte [eax + 0xd], 0
jne 0x4a0bbe
cmp dword [eax + 0x24], 8
lea edx, [eax + 0x10]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x254], eax
jb 0x4a0b72
mov edx, dword [edx]
cmp dword [ebp - 0x234], 8
lea ecx, [ebp - 0x248]
mov eax, dword [ebp - 0x238]
mov esi, eax
cmovae ecx, ebx
cmp dword [ebp - 0x254], esi
cmovb eax, dword [ebp - 0x254]
push eax
push edx
push ecx
call fcn.00449d70
mov esi, dword [ebp - 0x250]
add esp, 0xc
test eax, eax
jne 0x4a0bbc
mov eax, dword [ebp - 0x238]
cmp eax, dword [ebp - 0x254]
jae 0x4a0bc4
jmp 0x4a0bbe
jns 0x4a0bc4
mov dword [ebp - 0x258], esi
mov eax, dword [ebp - 0x234]
cmp eax, 8
jb 0x4a0c04
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x4a0bf4
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4a0d10
push ecx
push ebx
call fcn.0055c524
mov esi, dword [ebp - 0x250]
add esp, 8
mov eax, dword [ebp - 0x258]
cmp eax, esi
je 0x4a0c39
add eax, 0x28
lea ecx, [ebp - 0x230]
cmp ecx, eax
je 0x4a0c39
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x4a0c26
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.0042e330
mov esi, dword [ebp - 0x250]
mov eax, dword [ebp - 0x230]
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi], eax
mov eax, dword [ebp - 0x22c]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x228]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x224]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x220]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x21c]
mov dword [edi + 0x14], eax
push dword [esi + 4]
lea eax, [ebp - 0x250]
push eax
mov ecx, eax
call fcn.00440bd0
push 0x40
push dword [ebp - 0x250]
call fcn.0055c524
mov eax, edi
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055c3a9
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00429b60
push 0x641f60
call fcn.0055c868
add esp, 4
cmp dword [0x641f60], 0xffffffff
jne 0x4a09be
push esi
lea ecx, [ebp - 0x259]
mov byte [ebp - 4], 7
call fcn.00489a80
push 0x641f60
mov dword [0x641f5c], eax
mov byte [ebp - 4], 6
call fcn.0055c81e
add esp, 4
jmp 0x4a09be
call fcn.0056af64
int3