Function at 0x410840
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [esp + 0x40]
mov ebx, dword [eax + 8]
test ebx, ebx
je 0x4108b0
mov esi, dword [eax + 0xc]
mov edi, dword [esp + 0x40]
lea eax, [ebx + 0xfffffff]
shl eax, 4
movzx edi, byte [edi + 6]
test byte [esi + eax + 8], 0xf
jne 0x4109d0
cmp ebx, 1
jbe 0x410a50
test byte [esi + eax - 8], 0xf
je 0x410ad4
mov eax, edi
lea ecx, [ebx - 1]
test al, al
js 0x410892
test ebx, ecx
jne 0x4108a0
sub ebx, 2
test ebx, ecx
jne 0x410aa8
lea esi, [esi]
mov esi, ecx
xor edi, edi
add esp, 0x2c
mov eax, esi
mov edx, edi
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
xor edi, edi
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x14]
test edx, edx
je 0x4108a4
add ebx, 1
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._luaH_getint
test byte [eax + 8], 0xf
je 0x4108a4
mov edx, edi
or edx, esi
jne 0x4108e9
mov esi, 1
xor edi, edi
mov ebp, dword [esp + 0x40]
lea esi, [esi]
mov ecx, esi
mov ebx, edi
mov dword [esp], ebp
add ecx, esi
shld ebx, esi, 1
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebx
call sym._luaH_getint
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
test byte [eax + 8], 0xf
je 0x410962
mov esi, ecx
mov edi, ebx
cmp ebx, 0x3fffffff
jbe 0x4108f0
mov eax, dword [esp + 0x40]
mov dword [esp + 4], 0xffffffff
mov dword [esp + 8], 0x7fffffff
mov dword [esp], eax
call sym._luaH_getint
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], 0x7fffffff
test byte [eax + 8], 0xf
jne 0x410adb
xor ebp, ebp
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ebx, 1
sub eax, esi
sbb edx, edi
cmp ebx, eax
mov ebx, ebp
sbb ebx, edx
jae 0x4108a4
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
add ecx, esi
adc ebx, edi
mov eax, ecx
shrd eax, ebx, 1
mov edx, ebx
mov dword [esp + 4], eax
shr edx, 1
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 0x1c], edx
call sym._luaH_getint
mov edx, dword [esp + 0x1c]
test byte [eax + 8], 0xf
mov eax, dword [esp + 0x18]
je 0x410ac0
mov esi, eax
mov edi, edx
jmp 0x410964
mov edx, edi
test dl, dl
jns 0x410a44
lea edx, [ebx - 1]
test edx, ebx
je 0x410a44
test byte [esi + eax + 0x18], 0xf
je 0x410a3b
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call sym._luaH_realasize
lea edx, [eax + 0xfffffff]
shl edx, 4
test byte [esi + edx + 8], 0xf
je 0x410a2b
mov esi, eax
xor edi, edi
mov ebx, eax
jmp 0x4108b4
lea edx, [eax + ebx]
shr edx, 1
lea ecx, [edx + 0xfffffff]
shl ecx, 4
test byte [esi + ecx + 8], 0xf
jne 0x410af0
mov eax, edx
mov edx, eax
sub edx, ebx
cmp edx, 1
ja 0x410a10
mov eax, dword [esp + 0x40]
mov dword [eax + 8], ebx
mov esi, ebx
xor edi, edi
jmp 0x4108a4
mov esi, ebx
xor edi, edi
jmp 0x4108b4
mov ebp, 1
xor ecx, ecx
jmp 0x410a78
lea eax, [ebp + ecx]
shr eax, 1
lea edx, [eax + 0xfffffff]
shl edx, 4
test byte [esi + edx + 8], 0xf
jne 0x410ad0
mov ebp, eax
mov eax, ebp
sub eax, ecx
cmp eax, 1
ja 0x410a60
mov eax, edi
test al, al
js 0x410a92
lea eax, [ebx - 1]
test eax, ebx
jne 0x4108a0
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call sym._luaH_realasize
shr eax, 1
cmp eax, ecx
jae 0x4108a0
mov eax, dword [esp + 0x40]
mov dword [eax + 8], ecx
mov eax, edi
mov edi, dword [esp + 0x40]
or eax, 0xffffff80
mov byte [edi + 6], al
jmp 0x4108a0
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
jmp 0x410964
mov ecx, eax
jmp 0x410a78
mov ebp, ebx
jmp 0x410a55
mov esi, 0xffffffff
mov edi, 0x7fffffff
jmp 0x4108a4
mov ebx, edx
jmp 0x410a2b