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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59920b
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x6091d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [0x613ba4]
test edi, edi
jne 0x50c07c
push 0x30
call fcn.0053cd96
mov edi, eax
push 0x102
push edi
mov dword [ebp - 0x238], edi
call fcn.0053e300
add esp, 0xc
mov dword [0x613ba4], edi
push edi
call fcn.0053e321
add esp, 4
test eax, eax
je 0x50c092
push eax
call fcn.0053dde4
add esp, 4
cmp byte [esi], 0
mov byte [esi + 1], 1
jne 0x50c0ce
push 2
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
je 0x50c0c5
cmp eax, 1
je 0x50c0c5
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
cmp eax, 1
je 0x50c0c5
test eax, eax
jne 0x50c4a7
inc dword [0x613bb0]
mov byte [esi], 1
cmp dword [esi + 0x14], 0
jne 0x50c0f5
mov ecx, esi
call fcn.0050bde0
mov edi, eax
test edi, edi
js 0x50c0e7
cmp dword [esi + 0x14], 0
jne 0x50c0f5
mov ecx, esi
call fcn.004e5080
mov eax, edi
jmp 0x50c4b1
push 0x20a
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0056bdd0
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x50c4a7
cmp word [ebp - 0x21c], 0
jne 0x50c133
xor ecx, ecx
jmp 0x50c14f
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x50c140
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
push eax
lea ecx, [esi + 0x1c]
call int.004a96a0
cmp dword [esi + 0x18], 8
jb 0x50c16a
mov eax, dword [esi + 4]
jmp 0x50c16d
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x50c4a7
push str.SBTE.dll
lea edx, [esi + 4]
lea ecx, [ebp - 0x234]
call fcn.004c5910
add esp, 4
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
jb 0x50c1a1
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea ecx, [ebp - 0x234]
mov dword [esi + 0x34], eax
mov dword [ebp - 4], 0xffffffff
call fcn.004a9470
mov eax, dword [esi + 0x34]
test eax, eax
jne 0x50c1d5
mov ecx, esi
call fcn.004e5080
mov eax, 0xffffffe4
jmp 0x50c4b1
push str.SBCSCloseThreatEngine
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSResetScanOptions
push dword [esi + 0x34]
mov dword [esi + 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSEnableAV
push dword [esi + 0x34]
mov dword [esi + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSSetScanOption
push dword [esi + 0x34]
mov dword [esi + 0x40], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSGetScanOption
push dword [esi + 0x34]
mov dword [esi + 0x44], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSClearPathsToScan
push dword [esi + 0x34]
mov dword [esi + 0x48], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSRunScanner
push dword [esi + 0x34]
mov dword [esi + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSGetScannerResultsSizeW
push dword [esi + 0x34]
mov dword [esi + 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSGetScannerResultsW
push dword [esi + 0x34]
mov dword [esi + 0x54], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSOpenThreatEngineW
push dword [esi + 0x34]
mov dword [esi + 0x58], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSAddPathToScanW
push dword [esi + 0x34]
mov dword [esi + 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSClearThreatCategoryActions
push dword [esi + 0x34]
mov dword [esi + 0x60], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSAddThreatCategoryActionW
push dword [esi + 0x34]
mov dword [esi + 0x64], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSRunCleanerW
push dword [esi + 0x34]
mov dword [esi + 0x68], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSGetCleanerResultsW
push dword [esi + 0x34]
mov dword [esi + 0x6c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSGetCleanerResultsSizeW
push dword [esi + 0x34]
mov dword [esi + 0x70], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SBCSGetDefVersionW
push dword [esi + 0x34]
mov dword [esi + 0x74], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [esi + 0x54], 0
mov dword [esi + 0x78], eax
jne 0x50c30b
push str.SBCSGetScannerResultsSize
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x54], eax
cmp dword [esi + 0x58], 0
jne 0x50c322
push str.SBCSGetScannerResults
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x58], eax
cmp dword [esi + 0x5c], 0
jne 0x50c339
push str.SBCSOpenThreatEngine
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x5c], eax
cmp dword [esi + 0x60], 0
jne 0x50c350
push str.SBCSAddPathToScan
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x60], eax
cmp dword [esi + 0x68], 0
jne 0x50c367
push str.SBCSAddThreatCategoryAction
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x68], eax
cmp dword [esi + 0x6c], 0
jne 0x50c37e
push str.SBCSRunCleaner
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x6c], eax
cmp dword [esi + 0x70], 0
jne 0x50c395
push str.SBCSGetCleanerResults
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x70], eax
cmp dword [esi + 0x74], 0
jne 0x50c3ac
push str.SBCSGetCleanerResultsSize
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x74], eax
cmp dword [esi + 0x78], 0
jne 0x50c3c3
push str.SBCSGetDefVersion
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 0x78], eax
cmp dword [esi + 0x38], 0
je 0x50c430
cmp dword [esi + 0x3c], 0
je 0x50c430
cmp dword [esi + 0x40], 0
je 0x50c430
cmp dword [esi + 0x44], 0
je 0x50c430
cmp dword [esi + 0x48], 0
je 0x50c430
cmp dword [esi + 0x4c], 0
je 0x50c430
cmp dword [esi + 0x50], 0
je 0x50c430
cmp dword [esi + 0x54], 0
je 0x50c430
cmp dword [esi + 0x58], 0
je 0x50c430
cmp dword [esi + 0x5c], 0
je 0x50c430
cmp dword [esi + 0x60], 0
je 0x50c430
cmp dword [esi + 0x64], 0
je 0x50c430
cmp dword [esi + 0x68], 0
je 0x50c430
cmp dword [esi + 0x6c], 0
je 0x50c430
cmp dword [esi + 0x70], 0
je 0x50c430
cmp dword [esi + 0x74], 0
je 0x50c430
cmp dword [esi + 0x78], 0
je 0x50c430
xor eax, eax
jmp 0x50c4b1
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x60], 0
mov dword [esi + 0x64], 0
mov dword [esi + 0x68], 0
mov dword [esi + 0x6c], 0
mov dword [esi + 0x70], 0
mov dword [esi + 0x74], 0
mov dword [esi + 0x78], 0
mov ecx, esi
call fcn.004e5080
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053cb86
mov esp, ebp
pop ebp
ret