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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59d223
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x62819c]
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 - 0x254], edi
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.00546014
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 - 0x254]
mov byte [ebp - 4], 1
push esi
push eax
call fcn.00429080
add esp, 0x10
mov ebx, eax
mov byte [ebp - 4], 2
call fcn.00428a90
mov ecx, eax
test ecx, ecx
je 0x496f76
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x25c], eax
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 3
push 0
push eax
call fcn.0054b380
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]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x496c42
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x25c]
call fcn.00429870
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edx, dword [ebp - 0x254]
or ebx, 0xffffffff
mov byte [ebp - 4], 5
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x496c90
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword fs:[0x2c]
mov ecx, dword [0x633954]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x631af0]
cmp eax, dword [ecx + 4]
jg 0x496f80
mov ecx, dword [0x631aec]
test ecx, ecx
jne 0x496d4c
mov eax, dword [ebp - 0x230]
mov esi, dword [ebp - 0x25c]
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
xor eax, eax
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov byte [ebp - 4], 1
cmp dword [esi - 0xc], eax
je 0x496d29
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 0x496d3e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x250]
push dword [eax + 4]
jmp 0x496f3a
mov eax, dword [ecx]
lea edx, [ebp - 0x264]
push 0
push edx
call dword [eax]
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x254], eax
cmp ecx, eax
je 0x496db4
mov esi, dword [ebp - 0x250]
mov eax, ecx
push dword [esi + 4]
push eax
call fcn.0043fda0
mov edx, dword [ebp - 0x254]
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.0043fda0
push 0x40
push dword [ebp - 0x264]
call fcn.00546044
mov esi, dword [ebp - 0x25c]
add esp, 8
mov byte [ebp - 4], 1
cmp dword [esi - 0xc], 0
je 0x496df3
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 0x496e08
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 6
xor eax, eax
mov dword [ebp - 0x238], 0
push str.cookie
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
call fcn.0042daa0
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x268]
push eax
lea ecx, [ebp - 0x250]
call fcn.0043fdf0
mov esi, dword [ebp - 0x260]
mov ebx, dword [ebp - 0x250]
cmp byte [esi + 0xd], 0
jne 0x496e7c
lea eax, [esi + 0x10]
push eax
lea eax, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x250]
call fcn.004402a0
test al, al
je 0x496e7e
mov esi, ebx
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x496ec4
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x496eb4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x496fc5
push edx
push ecx
call fcn.00546044
mov ebx, dword [ebp - 0x250]
add esp, 8
cmp esi, ebx
je 0x496ef4
lea eax, [esi + 0x28]
lea ecx, [ebp - 0x230]
cmp ecx, eax
je 0x496ef4
cmp dword [eax + 0x14], 8
mov ecx, eax
jb 0x496edf
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x230]
call fcn.0042daa0
mov ebx, dword [ebp - 0x250]
mov eax, dword [ebp - 0x230]
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 [ebx + 4]
lea eax, [ebp - 0x250]
push eax
mov ecx, eax
call fcn.0043fda0
push 0x40
push dword [ebp - 0x250]
call fcn.00546044
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.00545ec7
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004293d0
push 0x631af0
call fcn.00546388
add esp, 4
cmp dword [0x631af0], 0xffffffff
jne 0x496cb0
push esi
lea ecx, [ebp - 0x255]
mov byte [ebp - 4], 6
call fcn.00482930
push 0x631af0
mov dword [0x631aec], eax
mov byte [ebp - 4], 5
call fcn.0054633e
add esp, 4
jmp 0x496cb0
call fcn.00555394
int3