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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x8b4
mov eax, dword [0x102a0ec]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push esi
mov dword [ebp - 4], eax
mov dword [ebp - 0x8a0], esi
mov edi, 0x80070002
call fcn.01016f8a
test eax, eax
je 0x1019d93
mov eax, dword [ebp + 0x10]
push esi
push 0x1006c70
xor edi, edi
push 5
mov dword [ebp - 0x8a4], edi
mov dword [ebp - 0x8ac], eax
call fcn.01028201
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0xc
mov dword [ebp - 0x8a8], 1
jmp 0x1019ac6
mov esi, dword [ebp - 0x8a0]
inc dword [ebp - 0x8a8]
xor eax, eax
cmp dword [ebp - 0x8ac], eax
je 0x1019bbd
mov esi, 0x208
push esi
lea eax, [ebp - 0x48c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1019d68
push 0x1006c54
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.0100d4ff
lea eax, [ebp - 0x48c]
push eax
call fcn.01016f8a
test eax, eax
je 0x1019b90
push 0x3c
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x8a0]
call fcn.0101819d
cmp dword [ebp + 0xc], 0
mov eax, 0x1006c48
jne 0x1019b38
mov eax, 0x1006c34
push eax
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.0100d4ff
push dword [ebp - 0x8a0]
lea eax, [ebp - 0x48c]
push esi
push eax
call fcn.0100d4ff
push 0x10045c4
push esi
lea eax, [ebp - 0x48c]
push eax
call fcn.0100d4ff
lea eax, [ebp - 0x48c]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.010188e7
xor ecx, ecx
test eax, eax
setge cl
test ecx, ecx
mov dword [ebp - 0x8a4], ecx
jne 0x1019d6f
call ebx
test eax, eax
jg 0x1019b9c
call ebx
mov edi, eax
jmp 0x1019bac
call ebx
mov edi, eax
and edi, 0xffff
or edi, 0x80070000
push edi
push dword [ebp - 0x8a0]
push 0x1006bf0
jmp 0x1019d3e
push eax
mov dword [ebp - 0x8b4], eax
call dword [sym.imp.ole32.dll_OleInitialize]
mov edi, eax
test edi, edi
jl 0x1019d7c
lea eax, [ebp - 0x89c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1019c2c
push esi
push 0x103
lea eax, [ebp - 0x694]
push eax
call fcn.0100c535
lea eax, [ebp - 0x694]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
test eax, eax
pop ecx
pop ecx
je 0x1019c2c
and word [eax], 0
lea eax, [ebp - 0x694]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov dword [ebp - 0x8b4], 1
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
mov esi, eax
add esi, 5
lea eax, [esi + esi]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x8b0], eax
je 0x1019ce4
push esi
push eax
push dword [ebp - 0x8a0]
call fcn.01018224
push 8
push 0
push dword [ebp - 0x8b0]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
cmp esi, 0x20
jbe 0x1019cab
cmp dword [ebp + 0xc], 0
mov eax, 0x1006bd8
jne 0x1019c85
mov eax, 0x1006bc4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1019ca2
call eax
mov edi, eax
xor eax, eax
test edi, edi
setge al
mov dword [ebp - 0x8a4], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1019cd8
call ebx
test eax, eax
jne 0x1019cb6
push 0x57
pop eax
test eax, eax
jg 0x1019cc3
call ebx
test eax, eax
jne 0x1019cd6
push 0x57
pop eax
jmp 0x1019cd6
call ebx
test eax, eax
jne 0x1019ccc
push 0x57
pop eax
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
push dword [ebp - 0x8b0]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x8b4], 0
je 0x1019cfa
lea eax, [ebp - 0x89c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call dword [sym.imp.ole32.dll_OleUninitialize]
cmp dword [ebp - 0x8a4], 0
jne 0x1019d86
test edi, edi
jne 0x1019d32
call ebx
test eax, eax
jg 0x1019d19
call ebx
mov edi, eax
jmp 0x1019d29
call ebx
mov edi, eax
and edi, 0xffff
or edi, 0x80070000
test edi, edi
jne 0x1019d32
mov edi, 0x80004005
push edi
push dword [ebp - 0x8a0]
push 0x1006b88
push 2
call fcn.01028201
xor eax, eax
add esp, 0x10
cmp dword [ebp - 0x8ac], eax
sete al
cmp dword [ebp - 0x8a8], 2
mov dword [ebp - 0x8ac], eax
jl 0x1019ac0
jmp 0x1019dbc
mov edi, 0x80004005
jmp 0x1019dbc
push dword [ebp - 0x8a0]
push 0x1006b4c
jmp 0x1019db2
push edi
push 0x1006798
push 0
jmp 0x1019db4
push dword [ebp - 0x8a0]
push 0x1006b18
jmp 0x1019db2
cmp dword [ebp + 0xc], 0
je 0x1019dac
push edi
push esi
push 0x1006ad8
push 2
call fcn.01028201
add esp, 0x10
jmp 0x1019dbc
push esi
push 0x1006aa8
push 5
call fcn.01028201
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.0101672d
leave
ret 0xc