Function at 0x5981b604
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ecx
mov ebx, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x5981b62b
xor edx, edx
mov dword [eax], edx
xor eax, eax
push ebp
push 0x5981b9f4
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
push ebp
push 0x5981b9c4
push dword fs:[0]
mov dword fs:[0], esp
test ebx, ebx
je 0x5981b9ba
mov eax, ebx
call sub.rtl120.bpl__System_TObject_ClassType_qqrv
mov edx, dword [ebp - 8]
neg edx
sub eax, edx
mov dword [ebp - 0x24], eax
mov eax, dword [0x59857198]
add eax, 0x3c
mov eax, dword [eax]
add eax, dword [0x59857198]
mov edx, dword [ebp - 0x24]
cmp edx, dword [0x59857198]
jbe 0x5981b69d
mov eax, dword [eax + 0x50]
add eax, dword [0x59857198]
cmp eax, dword [ebp - 0x24]
jbe 0x5981b69d
mov eax, dword [0x59857198]
mov dword [ebp - 0x14], eax
jmp 0x5981b6b9
mov ebx, dword [sym.imp.madBasic_.bpl__Madtools_FindModuleA]
mov ebx, dword [ebx]
lea ecx, [ebp - 4]
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0x24]
call ebx
test al, al
jne 0x5981b6b9
xor eax, eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5981b9ba
mov eax, dword [ebp - 0x14]
add eax, 0x3c
mov eax, dword [eax]
add eax, dword [ebp - 0x14]
test eax, eax
je 0x5981b9ba
movzx ecx, word [eax + 0x18]
cmp cx, 0x20b
jne 0x5981b6ed
mov ebx, eax
add ebx, 0x108
mov edx, ebx
jmp 0x5981b6f7
mov ebx, eax
add ebx, 0xf8
mov edx, ebx
test byte [edx + 0x24], 0x20
je 0x5981b72c
mov ebx, dword [edx + 0xc]
add ebx, dword [ebp - 0x14]
mov dword [ebp - 0x18], ebx
mov ebx, dword [edx + 8]
add ebx, dword [ebp - 0x18]
sub ebx, 3
mov dword [ebp - 0x1c], ebx
add edx, 0x28
test byte [edx + 0x24], 0x20
je 0x5981b765
mov ebx, dword [edx + 0xc]
add ebx, dword [ebp - 0x14]
add ebx, dword [edx + 8]
sub ebx, 3
mov dword [ebp - 0x1c], ebx
jmp 0x5981b765
cmp cx, 0x20b
jne 0x5981b750
lea edx, [eax + 0x18]
mov edx, dword [edx + 0x14]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
lea edx, [eax + 0x18]
mov edx, dword [edx + 4]
add edx, dword [ebp - 0x18]
sub edx, 3
mov dword [ebp - 0x1c], edx
jmp 0x5981b765
mov edx, dword [eax + 0x2c]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
mov edx, dword [eax + 0x1c]
add edx, dword [ebp - 0x18]
sub edx, 3
mov dword [ebp - 0x1c], edx
cmp cx, 0x20b
jne 0x5981b7bb
mov esi, dword [ebp - 0x1c]
mov ecx, eax
add ecx, 0x108
mov edx, ecx
movzx ecx, word [eax + 6]
dec ecx
test ecx, ecx
jl 0x5981b7a4
inc ecx
mov edi, dword [edx + 0x24]
test edi, 0x40
jne 0x5981b796
test edi, 0x80
je 0x5981b79e
mov esi, dword [edx + 0xc]
add esi, dword [ebp - 0x14]
jmp 0x5981b7a4
add edx, 0x28
dec ecx
jne 0x5981b783
mov edx, dword [ebp - 0x24]
mov ebx, dword [edx]
cmp esi, ebx
ja 0x5981b7d3
add eax, 0x18
add esi, dword [eax + 8]
sub esi, 3
mov dword [ebp - 0x1c], esi
jmp 0x5981b7d3
mov esi, dword [eax + 0x30]
add esi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov ebx, dword [edx]
cmp esi, ebx
ja 0x5981b7d3
add esi, dword [eax + 0x20]
sub esi, 3
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 8]
neg esi
mov eax, esi
add eax, dword [ebp - 0x24]
cmp ebx, eax
jne 0x5981b9ba
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 0x20
mov edx, ebx
sub edx, eax
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov edx, ebx
call fcn.5981b5f0
test al, al
je 0x5981b9ba
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 0x1c
mov edx, ebx
sub edx, eax
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov edx, ebx
call fcn.5981b5f0
test al, al
je 0x5981b9ba
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 0x18
mov edx, ebx
sub edx, eax
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov edx, ebx
call fcn.5981b5f0
test al, al
je 0x5981b9ba
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 0x14
mov edx, ebx
sub edx, eax
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov edx, ebx
call fcn.5981b5f0
test al, al
je 0x5981b9ba
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 0x10
mov edx, ebx
sub edx, eax
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
call fcn.5981b5f0
test al, al
je 0x5981b9ba
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 0xc
mov edx, ebx
sub edx, eax
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
call fcn.5981b5f0
test al, al
je 0x5981b9ba
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 8
mov edx, ebx
sub edx, eax
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
call fcn.5981b5f0
test al, al
je 0x5981b9ba
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 4
mov edx, ebx
sub edx, eax
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
call fcn.5981b5f0
test al, al
je 0x5981b9ba
lea eax, [ebp - 4]
mov edx, dword [ebp - 8]
neg edx
mov edx, esi
sub edx, 0x20
mov ecx, ebx
sub ecx, edx
mov edx, dword [ecx]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromString_qqrr27System__AnsiStringT_us_i0__rx28System__SmallString_iuc_255_us
mov eax, dword [ebp - 8]
neg eax
mov eax, esi
sub eax, 0x10
mov edx, ebx
sub edx, eax
mov edi, dword [edx]
mov eax, dword [ebp - 8]
neg eax
sub esi, 0x28
sub ebx, esi
mov ebx, dword [ebx]
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 4]
call sub.madBasic_.bpl__Madstrings_DecodeUtf8_qqrx27System__AnsiStringT_us_i0__
mov eax, dword [ebp - 0x28]
mov dl, 1
call sub.madBasic_.bpl__Madstrings_IsValidIdentW_qqrx20System_UnicodeStringo
test al, al
je 0x5981b9a0
test edi, edi
je 0x5981b96c
lea eax, [ebp - 0x2c]
inc edi
mov edx, edi
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromString_qqrr27System__AnsiStringT_us_i0__rx28System__SmallString_iuc_255_us
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System__LStrEqual_qqrv
jne 0x5981b9a0
cmp dword [ebp + 8], 0
je 0x5981b9a4
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
call sub.rtl120.bpl__System__LStrEqual_qqrv
je 0x5981b9a4
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0xc]
call sub.rtl120.bpl__System__LStrClr_qqrpv
mov ecx, eax
mov edx, ebx
mov eax, dword [ebp - 8]
call fcn.5981b604
pop ecx
test al, al
jne 0x5981b9a4
xor eax, eax
jmp 0x5981b9a6
mov al, 1
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
je 0x5981b9ba
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System__LStrAsg_qqrpvpxv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5981b9ce
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5981b9fb
lea eax, [ebp - 0x2c]
call sub.rtl120.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x28]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__LStrClr_qqrpv
ret