Function at 0x59829230
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xb
push 0
push 0
dec ecx
jne 0x59829239
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], edx
mov ebx, eax
mov esi, dword [ebp + 8]
xor eax, eax
push ebp
push 0x59829819
push dword fs:[eax]
mov dword fs:[eax], esp
push esi
lea edx, [ebp - 0x38]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x320]
mov eax, dword [ebp - 0x38]
push eax
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0xc]
mov edx, eax
mov ecx, 0x59829838
pop eax
call sym.madExcept_.bpl__Madnvprgralert_NewProgressAlert_qqrx20System_UnicodeStringuit1
push 0
push 0x64
lea edx, [ebp - 0x3c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x328]
mov edx, dword [ebp - 0x3c]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x150]
test al, al
jne 0x598292f9
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x158]
test al, al
jne 0x598292f9
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0xf8]
test al, al
jne 0x598292f9
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0xe0]
test al, al
jne 0x598292f9
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0xe8]
test al, al
jne 0x598292f9
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0xf0]
test al, al
je 0x598293bc
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x150]
test al, al
je 0x59829322
push 0
push 0x64
lea edx, [ebp - 0x40]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x330]
mov edx, dword [ebp - 0x40]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
push 0
push 0x64
lea edx, [ebp - 0x44]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x338]
mov edx, dword [ebp - 0x44]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x150]
test al, al
jne 0x59829359
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x158]
test al, al
je 0x59829374
push 0
push 0x64
lea edx, [ebp - 0x48]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x340]
mov edx, dword [ebp - 0x48]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
cmp dword [ebp - 0x20], 0
je 0x598293a1
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x598293a1
push 0
push 0x64
lea edx, [ebp - 0x4c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x350]
mov edx, dword [ebp - 0x4c]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
push 0
push 0x64
lea edx, [ebp - 0x50]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x358]
mov edx, dword [ebp - 0x50]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
cmp byte [ebp + 0x10], 0
je 0x598293cd
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x28]
test al, al
je 0x598293e9
cmp byte [ebp + 0xc], 0
je 0x598293d8
xor eax, eax
mov dword [ebp + 0x14], eax
movzx ecx, byte [ebp + 0xc]
xor cl, 1
mov eax, dword [esi]
mov edx, dword [ebp + 0x14]
mov ebx, dword [eax]
call dword [ebx + 0x34]
mov eax, dword [ebp - 0x24]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
mov eax, dword [ebp + 0x1c]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
mov eax, dword [ebp + 0x18]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
lea eax, [ebp - 4]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
lea eax, [ebp - 8]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
lea eax, [ebp - 0xc]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
cmp dword [ebp - 0x20], 0
je 0x598297c9
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x598297c9
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x10]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
mov ebx, dword [eax]
call dword [ebx + 0x18]
lea edx, [ebp - 0x54]
mov eax, dword [ebp - 0x10]
call sym.madExcept_.bpl__Madexcept_RelativeToAbsolute_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x10]
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x598294b2
mov eax, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
jne 0x598294e9
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
je 0x598297bd
lea eax, [ebp - 0x58]
mov edx, dword [ebp - 0x10]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x58]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x598297bd
cmp dword [ebp - 0x18], 0
setne byte [ebp - 0x2d]
cmp byte [ebp - 0x2d], 0
je 0x59829739
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__DynArrayHigh_qqrv
mov esi, eax
test esi, esi
jl 0x5982952d
inc esi
xor ebx, ebx
mov edi, dword [sym.imp.madBasic_.bpl__Madstrings_IsTextEqualW]
mov edi, dword [edi]
mov eax, dword [ebp - 4]
mov eax, dword [eax + ebx*4]
mov edx, dword [ebp - 0x18]
call edi
test al, al
je 0x59829529
mov byte [ebp - 0x2d], 0
jmp 0x5982952d
inc ebx
dec esi
jne 0x5982950c
cmp byte [ebp - 0x2d], 0
je 0x598297bd
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__DynArrayLength_qqrv
inc eax
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__DynArrayHigh_qqrv
mov edx, dword [ebp - 4]
lea eax, [edx + eax*4]
mov edx, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 8]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
lea eax, [ebp - 0xc]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
xor eax, eax
mov dword [ebp - 0x2c], eax
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
sub esi, ebx
jl 0x59829652
inc esi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x10]
mov edx, ebx
mov eax, dword [ebp - 0x20]
mov edi, dword [eax]
call dword [edi + 0x18]
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x10]
call sym.madExcept_.bpl__Madexcept_RelativeToAbsolute_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x5c]
lea eax, [ebp - 0x10]
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__DynArrayHigh_qqrv
mov edx, dword [ebp - 4]
mov edx, dword [edx + eax*4]
mov edi, dword [sym.imp.madBasic_.bpl__Madstrings_IsTextEqualW]
mov edi, dword [edi]
mov eax, dword [ebp - 0x18]
call edi
test al, al
je 0x5982964a
mov edi, dword [ebp - 0x2c]
inc edi
push edi
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
push edi
lea eax, [ebp - 0xc]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x2c]
lea eax, [eax + edx*4]
mov edx, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x2c]
lea eax, [eax + edx*4]
mov edx, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
inc dword [ebp - 0x2c]
inc ebx
dec esi
jne 0x598295a5
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x10]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
mov ebx, dword [eax]
call dword [ebx + 0x18]
lea eax, [ebp - 0x10]
call fcn.598197c4
cmp dword [ebp - 0x10], 0
je 0x598297bd
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__DynArrayHigh_qqrv
push eax
lea eax, [ebp - 0x60]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 8]
pop ecx
call sub.madBasic_.bpl__Madzip_Zip_qqrx20System_UnicodeStringpx20System_UnicodeStringxix45System__DynamicArray_t20System_UnicodeStr
test al, al
je 0x598297bd
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
call sub.rtl120.bpl__System__DynArrayLength_qqrv
mov ebx, eax
lea esi, [ebx + 1]
push esi
mov eax, dword [ebp - 0x24]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
push esi
mov eax, dword [ebp + 0x1c]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
push esi
mov eax, dword [ebp + 0x18]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
lea eax, [eax + ebx*4]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
lea eax, [eax + ebx*4]
mov edx, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
lea eax, [eax + ebx*4]
mov edx, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x598297bd
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
call sub.rtl120.bpl__System__DynArrayLength_qqrv
mov ebx, eax
lea esi, [ebx + 1]
push esi
mov eax, dword [ebp - 0x24]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
push esi
mov eax, dword [ebp + 0x1c]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
push esi
mov eax, dword [ebp + 0x18]
mov ecx, 1
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
call sub.rtl120.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
lea eax, [eax + ebx*4]
mov edx, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
lea eax, [eax + ebx*4]
mov edx, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
lea eax, [eax + ebx*4]
mov edx, dword [ebp - 0x1c]
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
inc dword [ebp - 0x28]
dec dword [ebp - 0x34]
jne 0x59829463
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59829820
lea eax, [ebp - 0x60]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x58]
call sub.rtl120.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x54]
mov edx, 8
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x1c]
mov edx, 4
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0xc]
mov edx, dword [sym.imp.madBasic_.bpl___xp_25Madtypes_TDAUnicodeString]
mov ecx, 3
call sub.rtl120.bpl__System__FinalizeArray_qqrpvt1ui
ret