Function at 0x4b7880
Capabilities:
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x5645f5
mov eax, dword fs:[0]
push eax
sub esp, 0x44c
mov eax, dword [0x5b7b5c]
xor eax, esp
mov dword [esp + 0x448], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5b7b5c]
xor eax, esp
push eax
lea eax, [esp + 0x460]
mov dword fs:[0], eax
xor ebp, ebp
push ebp
mov edi, ecx
mov ecx, dword [0x5ba378]
push 0x208
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x28], edi
call fcn.00412560
lea eax, [esp + 0x4c]
lea ecx, [edi + 0x134]
lea edx, [eax + 2]
mov si, word [eax]
add eax, 2
cmp si, bp
jne 0x4b78e6
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x50]
push edx
call fcn.00401e40
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, edi
call fcn.004b41d0
mov eax, vtable.CArray_class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t_____class_ATL::CStringT_wchar_t__class_StrTraitMFC_wchar_t__class_ATL::ChTraitsCRT_wchar_t_____.0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x468], ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], ebp
mov dword [0x5c3130], ebp
mov dword [0x5c3134], ebp
mov byte [esp + 0x468], 1
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
lea ecx, [esp + 0x38]
cmp dword [edi + 0xac], ebp
je 0x4b7a3e
push 0xffffffffffffffff
push 1
call fcn.00433f60
mov ecx, dword [esp + 0x3c]
push 0x5c316c
call fcn.004060b0
mov ebx, dword [0x5c3160]
cmp word [ebx], bp
je 0x4b7c3e
call fcn.005089db
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
je 0x4b7c92
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ecx, [eax + 0x10]
mov dword [esp + 0x14], ecx
movzx eax, word [ebx]
mov byte [esp + 0x468], 4
cmp ax, bp
je 0x4b7ba6
cmp ax, 0x3b
je 0x4b7b7c
mov edi, dword [ecx - 0xc]
movzx ebp, ax
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
lea esi, [edi + 1]
sub eax, esi
or eax, edx
jge 0x4b7a02
push esi
lea ecx, [esp + 0x18]
call fcn.00401bd0
mov ecx, dword [esp + 0x14]
mov word [ecx + edi*2], bp
test esi, esi
jl 0x4b7c9c
mov eax, dword [esp + 0x14]
cmp esi, dword [eax - 8]
jg 0x4b7c9c
mov dword [eax - 0xc], esi
mov edx, dword [esp + 0x14]
xor ecx, ecx
add ebx, 2
mov word [edx + esi*2], cx
movzx eax, word [ebx]
mov ecx, dword [esp + 0x14]
xor ebp, ebp
test ax, ax
jne 0x4b79d0
jmp 0x4b7ba6
mov edx, dword [0x5c3168]
push ecx
push edx
call fcn.004351c0
mov ecx, dword [0x5c3164]
lea eax, [esp + 0x2c]
push eax
push ecx
call fcn.004351c0
mov eax, dword [esp + 0x3c]
mov ebx, eax
mov esi, eax
xor ecx, ecx
mov edx, 0x98
mul edx
seto cl
mov dword [esp + 0x30], ebx
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.004ff95f
add esp, 0x14
mov dword [esp + 0x18], eax
mov byte [esp + 0x468], 2
cmp eax, ebp
je 0x4b7abc
push fcn.004c2840
push fcn.004c5860
push esi
lea edi, [eax + 4]
push 0x98
push edi
mov dword [eax], esi
call fcn.0054075e
mov eax, edi
jmp 0x4b7abe
xor eax, eax
xor edi, edi
cmp ebx, ebp
mov byte [esp + 0x468], 1
mov dword [esp + 0x18], eax
jle 0x4b7989
mov ebx, eax
cmp edi, ebp
jl 0x4b7b77
cmp edi, dword [esp + 0x2c]
jge 0x4b7b77
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + edi*4]
push eax
call fcn.00422690
add esp, 4
mov esi, eax
push esi
lea ecx, [esp + 0x18]
call fcn.004022b0
cmp edi, dword [esp + 0x2c]
mov byte [esp + 0x468], 3
jge 0x4b7b77
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x14]
lea ecx, [edx + edi*4]
push eax
call fcn.004060b0
mov ecx, dword [esp + 0x14]
push ebp
push ecx
mov ecx, ebx
call fcn.004c8930
push esi
call fcn.004ff96a
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x468], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4b7b61
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc edi
add ebx, 0x98
cmp edi, dword [esp + 0x20]
jl 0x4b7ad6
jmp 0x4b7989
call fcn.00507f95
cmp word [ebx], bp
je 0x4b7ba6
movzx eax, word [ebx + 2]
add ebx, 2
cmp ax, bp
je 0x4b7ba6
lea ecx, [ecx]
mov edx, 0x20
cmp dx, ax
jne 0x4b7ba6
movzx eax, word [ebx + 2]
add ebx, 2
cmp ax, bp
jne 0x4b7b90
cmp dword [ecx - 0xc], ebp
jle 0x4b7c11
lea eax, [esp + 0x14]
push eax
call fcn.00414280
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x18]
mov edi, dword [ecx - 0xc]
add esp, 4
xor esi, esi
mov ebp, eax
test eax, eax
jle 0x4b7c0f
jmp 0x4b7bd4
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x1c]
cmp dword [edx + 0x114], 0
jne 0x4b7c0f
test esi, esi
jl 0x4b7b77
cmp esi, eax
jge 0x4b7b77
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + esi*4]
push edx
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x28]
push eax
push edx
push edi
push ecx
call fcn.00434db0
mov ecx, dword [esp + 0x2c]
inc esi
add esp, 0x18
cmp esi, ebp
jl 0x4b7bd0
xor ebp, ebp
lea eax, [ecx - 0x10]
mov byte [esp + 0x468], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4b7c35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp word [ebx], bp
jne 0x4b7998
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x4b7c66
mov ecx, dword [eax - 4]
lea esi, [eax - 4]
push fcn.004c2840
push ecx
push 0x98
push eax
call fcn.0053fee9
push esi
call fcn.004ff96a
add esp, 4
mov ecx, dword [esp + 0x1c]
call fcn.004b72a0
mov edx, dword [0x5ba378]
mov eax, dword [edx + 0xd8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.005089db
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x4b7ca6
push 0x80004005
call fcn.00401340
push 0x80070057
call fcn.00401340
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
push 0xe001
mov byte [esp + 0x46c], 5
call fcn.00508953
cmp eax, ebp
je 0x4b7cdf
push 0xe001
push eax
lea ecx, [esp + 0x20]
call fcn.00401d70
mov edi, dword [esp + 0x18]
mov ecx, dword [0x5ed0c0]
mov edx, dword [ecx + 0x10c]
push edi
push ebp
push 0x40b
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x114]
neg esi
sbb esi, esi
add edi, 0xfffffff0
mov byte [esp + 0x468], 1
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4b7d2b
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
lea ecx, [esp + 0x24]
mov byte [esp + 0x468], 0
call fcn.00447ff0
lea ecx, [esp + 0x38]
mov dword [esp + 0x468], 0xffffffff
call fcn.00447ff0
mov eax, esi
mov ecx, dword [esp + 0x460]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x448]
xor ecx, esp
call fcn.0053f73f
add esp, 0x458
ret