Function at 0x598197c4
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd4
push ebx
push esi
xor edx, edx
mov dword [ebp - 0x22c], edx
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x224], edx
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x210], edx
mov dword [ebp - 0x214], edx
mov dword [ebp - 0x218], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x59819a36
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x59819902
lea eax, [ebp - 0x20a]
push eax
push 0x104
call sub.kernel32.dll_GetTempPathW
test eax, eax
jbe 0x5981984a
mov eax, ebx
lea edx, [ebp - 0x20a]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
jmp 0x59819853
mov eax, ebx
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
cmp dword [ebx], 0
jne 0x59819866
mov ecx, ebx
xor edx, edx
mov eax, 0x1a
call sym.madExcept_.bpl__Madexcept_GetSpecialFolderW_qqrio
cmp dword [ebx], 0
je 0x598199f2
push 0
lea eax, [ebp - 0x20a]
push eax
call sub.kernel32.dll_CreateDirectoryW
mov eax, dword [ebx]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
mov edx, dword [ebx]
cmp word [edx + eax*2 - 2], 0x5c
je 0x5981989a
mov eax, ebx
mov edx, 0x59819a50
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
push dword [ebx]
lea edx, [ebp - 0x218]
xor eax, eax
call fcn.5981950c
mov eax, dword [ebp - 0x218]
lea edx, [ebp - 0x214]
call sub.madBasic_.bpl__Madstrings_ExtractFileNameW_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x214]
lea edx, [ebp - 0x210]
call fcn.598195c0
push dword [ebp - 0x210]
push 0x59819a60
mov eax, ebx
mov edx, 3
call sub.rtl120.bpl__System__UStrCatN_qqrv
push 0
mov eax, dword [ebx]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CreateDirectoryW
mov eax, ebx
mov edx, 0x59819a50
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x598199f2
lea eax, [ebp - 0x20a]
push eax
push 0x104
call sub.kernel32.dll_GetTempPathA
test eax, eax
jbe 0x598199e9
lea eax, [ebp - 0x21c]
lea esi, [ebp - 0x20a]
mov edx, esi
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromPChar_qqrr27System__AnsiStringT_us_i0__pcus
mov edx, dword [ebp - 0x21c]
mov eax, ebx
call sub.rtl120.bpl__System__UStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
cmp dword [ebx], 0
je 0x598199f2
push 0
push esi
call sub.kernel32.dll_CreateDirectoryA
mov eax, dword [ebx]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
mov edx, dword [ebx]
cmp word [edx + eax*2 - 2], 0x5c
je 0x5981996e
mov eax, ebx
mov edx, 0x59819a50
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
push dword [ebx]
lea edx, [ebp - 0x228]
xor eax, eax
call fcn.5981950c
mov eax, dword [ebp - 0x228]
lea edx, [ebp - 0x224]
call sub.madBasic_.bpl__Madstrings_ExtractFileNameW_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x224]
lea edx, [ebp - 0x220]
call fcn.598195c0
push dword [ebp - 0x220]
push 0x59819a60
mov eax, ebx
mov edx, 3
call sub.rtl120.bpl__System__UStrCatN_qqrv
push 0
lea eax, [ebp - 0x22c]
mov edx, dword [ebx]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x22c]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_CreateDirectoryA
mov eax, ebx
mov edx, 0x59819a50
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x598199f2
mov eax, ebx
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59819a3d
lea eax, [ebp - 0x22c]
call sub.rtl120.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x228]
mov edx, 3
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x21c]
call sub.rtl120.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x218]
mov edx, 3
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret