Function at 0x5009816c
Capabilities:
Enumerate network shares

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbc4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x438], ecx
mov dword [ebp - 0x43c], ecx
mov dword [ebp - 0x434], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__LStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x500984a3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
call sym.rtl120.bpl__System__LStrAsg_qqrpvpxv
mov eax, dword [sym.rtl120.bpl__Sysutils_Win32Platform]
cmp dword [eax], 1
jne 0x500981c7
mov eax, dword [sym.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 4
jle 0x5009821c
mov dword [ebp - 0x18], 0x400
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x430]
push eax
push 1
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.mpr.dll_WNetGetUniversalNameA
test eax, eax
jne 0x50098472
lea eax, [ebp - 0x434]
lea edx, [ebp - 0x430]
mov edx, dword [edx]
call sym.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov edx, dword [ebp - 0x434]
mov eax, dword [ebp - 8]
mov ecx, 0
call sym.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
jmp 0x50098472
mov eax, dword [ebp - 4]
test eax, eax
je 0x5009823b
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x5009823b
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call sym.rtl120.bpl__System__InternalLStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
movzx eax, byte [eax]
mov edx, eax
add dl, 0x9f
sub dl, 0x1a
jae 0x5009824a
sub al, 0x20
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0x41
jb 0x50098259
cmp byte [ebp - 0x19], 0x5a
jbe 0x5009825d
mov al, 1
jmp 0x5009828b
mov eax, dword [ebp - 4]
test eax, eax
je 0x5009827c
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x5009827c
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call sym.rtl120.bpl__System__InternalLStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
test eax, eax
je 0x50098285
sub eax, 4
mov eax, dword [eax]
cmp eax, 3
setl al
test al, al
je 0x50098293
mov al, 1
jmp 0x5009829d
mov eax, dword [ebp - 4]
cmp byte [eax + 1], 0x3a
setne al
test al, al
je 0x500982a5
mov al, 1
jmp 0x500982af
mov eax, dword [ebp - 4]
cmp byte [eax + 2], 0x5c
setne al
test al, al
jne 0x50098472
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 1
push 1
call sub.mpr.dll_WNetOpenEnumW
test eax, eax
jne 0x50098472
xor eax, eax
push ebp
push 0x5009846b
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 0x640
mov eax, dword [ebp - 0xc]
call sym.rtl120.bpl__System__GetMem_qqri
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x5009844d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.mpr.dll_WNetEnumResourceA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xea
jne 0x5009833f
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0xc]
call sym.rtl120.bpl__System__ReallocMem_qqrrpvi
jmp 0x500982fe
cmp dword [ebp - 0x10], 0
je 0x50098354
call sym.rtl120.bpl__System__TryFinallyExit_qqrv
call sym.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x50098472
mov esi, dword [ebp - 0x14]
dec esi
test esi, esi
jl 0x500982fe
inc esi
xor edi, edi
mov eax, edi
add eax, eax
add eax, eax
mov edx, dword [ebp - 0x24]
lea ebx, [edx + eax*8]
cmp dword [ebx + 0x10], 0
je 0x50098427
mov eax, dword [ebx + 0x10]
movzx eax, byte [eax]
mov byte [ebp - 0x25], al
movzx eax, byte [ebp - 0x25]
add al, 0x9f
sub al, 0x1a
jae 0x5009838c
sub byte [ebp - 0x25], 0x20
movzx eax, byte [ebp - 0x19]
cmp al, byte [ebp - 0x25]
jne 0x50098427
mov eax, dword [ebp - 4]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x500983c1
mov eax, dword [ebp - 0x2c]
sub eax, 0xa
cmp word [eax], 1
je 0x500983c1
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 4]
call sym.rtl120.bpl__System__InternalLStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x500983d8
mov eax, dword [ebp - 0x30]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x438]
push eax
mov ecx, dword [ebp - 0x30]
sub ecx, 2
mov edx, 3
mov eax, dword [ebp - 4]
call sym.rtl120.bpl__System__LStrCopy_qqrv
mov eax, dword [ebp - 0x438]
push eax
lea eax, [ebp - 0x43c]
mov edx, dword [ebx + 0x14]
mov ecx, 0
call sym.rtl120.bpl__System__LStrFromPChar_qqrr27System__AnsiStringT_us_i0__pcus
mov edx, dword [ebp - 0x43c]
mov eax, dword [ebp - 8]
pop ecx
call sym.rtl120.bpl__System__LStrCat3_qqrv
call sym.rtl120.bpl__System__TryFinallyExit_qqrv
call sym.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x50098472
inc edi
dec esi
jne 0x5009835f
jmp 0x500982fe
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x500984aa
lea eax, [ebp - 0x43c]
mov edx, 2
call sym.rtl120.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x434]
call sym.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 4]
call sym.rtl120.bpl__System__LStrClr_qqrpv
ret