Function at 0x52ab00
Capabilities:
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x589d68
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5eb3c0]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x28]
xor ebx, ebx
cmp dword [ebp + 4], ebx
jne 0x52ad10
mov eax, dword [0x5f7780]
mov edx, dword [eax + 0xc]
mov ecx, 0x5f7780
call edx
add eax, 0x10
mov dword [esp + 0x28], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x24], ebx
call fcn.0047ba80
add esp, 4
lea edi, [esp + 0x28]
mov byte [esp + 0x20], 1
call fcn.00480f90
mov byte [esp + 0x20], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52ab8d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x28]
cmp dword [esi - 0xc], ebx
jne 0x52ac63
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x10e
or eax, ecx
jge 0x52abc0
mov ecx, 0x10e
lea eax, [esp + 0x28]
call fcn.00481530
mov esi, dword [esp + 0x28]
push 0x104
push esi
push 0x400000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp esi, ebx
jne 0x52abd9
xor eax, eax
jmp 0x52abf5
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x52abe0
sub eax, edx
sar eax, 1
js 0x52ad17
cmp eax, dword [esi - 8]
jg 0x52ad17
push 0x5c
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], bx
call fcn.00565b2a
add esp, 8
cmp eax, ebx
jne 0x52ac19
or eax, 0xffffffff
jmp 0x52ac1d
sub eax, esi
sar eax, 1
add eax, 1
lea ecx, [esp + 0x14]
lea edx, [esp + 0x28]
call fcn.0047dae0
lea edi, [esp + 0x28]
mov byte [esp + 0x20], 2
call fcn.00480f90
mov byte [esp + 0x20], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52ac5f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x18]
push edx
mov ebx, str.kvipcore.dll
call fcn.00478cb0
mov eax, dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
add esp, 8
push eax
call edi
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52acaf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ebx, ebx
cmp dword [ebp + 4], ebx
jne 0x52acc4
push str.kvipcore.dll
call edi
cmp eax, ebx
mov dword [ebp + 4], eax
je 0x52ad21
mov ecx, dword [ebp + 4]
push str.KVipGetClassObject
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x52ad21
lea edi, [ebp + 8]
push edi
push 0x5bc31c
mov dword [edi], ebx
call eax
cmp eax, ebx
jl 0x52ad21
mov edi, dword [edi]
cmp edi, ebx
je 0x52ad21
mov eax, dword [0x5f8cbc]
mov ecx, dword [0x5f8cb8]
mov edx, dword [edi]
mov edx, dword [edx + 0xc]
push eax
push ecx
push edi
call edx
cmp eax, ebx
jl 0x52ad21
lea ecx, [esp + 0x28]
call fcn.004818c0
mov eax, 1
jmp 0x52ad75
push 0x80070057
call fcn.00473d10
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x52ad3e
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
push eax
call edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebp + 8], ebx
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x52ad4f
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp + 4], ebx
lea eax, [esi - 0x10]
mov dword [esp + 0x20], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52ad73
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4