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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60c
mov eax, dword [0x7dcee0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x14]
cmp ecx, 0x10
mov edx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x608], edx
jle 0x4ae999
mov eax, dword [0x7b5084]
mov esi, dword [eax]
push ecx
push edx
push str.ERROR_::_DLL_Define_::_function__s_has_too_many_parameters__limit_16____has__d_n
push eax
mov eax, dword [esi + 8]
call eax
add esp, 0x10
or eax, 0xffffffff
jmp 0x4aeca9
cmp ecx, 4
jle 0x4ae9b2
xor eax, eax
test ecx, ecx
jle 0x4ae9b2
mov edi, dword [ebp + 0x18]
cmp dword [edi + eax*4], 0
jne 0x4ae9d6
inc eax
cmp eax, ecx
jl 0x4ae9a4
push esi
call fcn.0044c430
add esp, 4
push esi
test al, al
je 0x4ae9f4
lea eax, [ebp - 0x404]
push 0x400
push eax
call fcn.0044aab0
add esp, 0xc
jmp 0x4aea2b
mov eax, dword [0x7b5084]
mov ecx, dword [eax]
push edx
mov edx, dword [ecx + 8]
push str.ERROR_::_DLL_Define_::_function__s_has_more_than_4_parameters_and_they_are_not_all_numbers_n
push eax
call edx
add esp, 0xc
or eax, 0xffffffff
jmp 0x4aeca9
call fcn.0044c3e0
add esp, 4
test al, al
je 0x4aea17
push esi
lea ecx, [ebp - 0x404]
push 0x400
push ecx
call fcn.0044a7f0
add esp, 0xc
jmp 0x4aea2b
lea edx, [ebp - 0x404]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4aea21
mov edi, dword [0xa187f0]
xor ebx, ebx
xor esi, esi
test edi, edi
jle 0x4aeaa3
cmp esi, dword [0xa187f4]
jge 0x4aea4c
mov edx, dword [0xa187f8]
mov eax, dword [edx + esi*4]
jmp 0x4aea4e
xor eax, eax
mov ecx, dword [eax]
lea eax, [ebp - 0x404]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4aea76
test dl, dl
je 0x4aea72
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4aea76
add eax, 2
add ecx, 2
test dl, dl
jne 0x4aea56
xor eax, eax
jmp 0x4aea7b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4aea96
cmp esi, dword [0xa187f4]
jge 0x4aea91
mov eax, dword [0xa187f8]
mov eax, dword [eax + esi*4]
jmp 0x4aea93
xor eax, eax
mov ebx, dword [eax + 4]
inc esi
cmp esi, edi
jl 0x4aea39
test ebx, ebx
jne 0x4aeb3d
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0
push 0
call ebx
mov esi, eax
lea eax, [esi + 1]
call fcn.00697040
mov edi, esp
push edi
push esi
call ebx
push 0
push 0
push 0xffffffffffffffff
lea ecx, [ebp - 0x404]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
lea eax, [esi + esi + 2]
call fcn.00697040
mov ebx, esp
push esi
push ebx
push 0xffffffffffffffff
lea edx, [ebp - 0x404]
push edx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test ebx, ebx
jne 0x4aeb37
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x7b5088]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 8]
push str.LoadLibraryA_failed_with_error_code__d_n
push ecx
call eax
add esp, 0xc
or eax, 0xffffffff
jmp 0x4aeca9
mov edi, dword [0xa187f0]
cmp edi, dword [0xa187f4]
jl 0x4aeb59
add edi, 5
push edi
mov ecx, 0xa187f4
call fcn.004aad90
mov edi, dword [0xa187f0]
push 0x64
mov dword [ebp - 0x60c], edi
call fcn.0069577f
xor esi, esi
add esp, 4
cmp eax, esi
je 0x4aeb79
mov dword [eax], esi
mov dword [eax + 8], esi
mov dword [eax + 0x60], esi
jmp 0x4aeb7b
xor eax, eax
mov ecx, dword [0xa187f0]
mov edx, dword [0xa187f8]
mov dword [edx + ecx*4], eax
mov eax, dword [0xa187f0]
cmp eax, dword [0xa187f4]
jge 0x4aeba0
mov ecx, dword [0xa187f8]
mov esi, dword [ecx + eax*4]
lea edx, [ebp - 0x404]
push edx
mov dword [esi + 4], ebx
call fcn.005410f0
mov edi, dword [ebp - 0x608]
push edi
mov dword [esi], eax
call fcn.005410f0
add esp, 8
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
mov dword [esi + 8], eax
call edi
xor ecx, ecx
mov dword [esi + 0x10], ecx
cmp eax, ecx
jne 0x4aec24
xor eax, eax
cmp dword [ebp + 0x14], eax
jle 0x4aebf7
lea ecx, [ecx]
mov edx, dword [ebp + 0x18]
cmp dword [edx + eax*4], 0
jne 0x4aebee
add ecx, 8
jmp 0x4aebf1
add ecx, 4
inc eax
cmp eax, dword [ebp + 0x14]
jl 0x4aebe0
mov eax, dword [ebp - 0x608]
push ecx
push eax
lea ecx, [ebp - 0x604]
push str.__s__d
push ecx
call fcn.00696e5e
add esp, 0x10
lea edx, [ebp - 0x604]
push edx
push ebx
call edi
mov dword [esi + 0x10], 1
mov dword [esi + 0xc], eax
test eax, eax
je 0x4ae991
mov edi, dword [ebp - 0x60c]
inc dword [0xa187f0]
cmp edi, dword [0xa187f4]
jge 0x4aec4d
mov eax, dword [0xa187f8]
mov esi, dword [eax + edi*4]
jmp 0x4aec4f
xor esi, esi
mov edx, dword [ebp + 0x14]
xor eax, eax
mov dword [esi + 0x14], edx
test edx, edx
jle 0x4aec70
lea ecx, [esi + 0x18]
mov edi, edi
mov ebx, dword [ebp + 0x18]
mov ebx, dword [ebx + eax*4]
mov dword [ecx], ebx
inc eax
add ecx, 4
cmp eax, edx
jl 0x4aec60
mov edx, dword [esi + 8]
mov ecx, dword [ebp + 0x1c]
push str.RegisterCallbacks
push edx
mov dword [esi + 0x5c], ecx
call fcn.006966b0
add esp, 8
test eax, eax
je 0x4aeca7
mov eax, dword [esi + 0xc]
push fcn.004e5d40
push fcn.004e5480
push fcn.004a6530
push fcn.004475d0
call eax
add esp, 0x10
mov eax, edi
lea esp, [ebp - 0x618]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0069528d
mov esp, ebp
pop ebp
ret