Function at 0x477ac0
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 0x14]
xor ebx, ebx
mov ebp, 1
cmp eax, ebx
je 0x477b43
cmp dword [0x4e360c], ebx
je 0x477b43
push eax
mov dword [esp + 0x14], ebp
call fcn.00476de0
add esp, 4
mov esi, dword [edi]
mov dword [esp + 0x18], esi
cmp esi, ebx
je 0x477b1e
cmp word [esi + 0xc], bx
jne 0x477be5
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x477b1e
jmp 0x477b10
cmp word [eax + 0xc], bx
jne 0x477bbe
mov dword [esp + 0x18], eax
mov esi, dword [edi + 8]
cmp esi, ebx
je 0x477b49
mov dword [edi + 8], ebx
add dword [edi + 0x28], ebp
mov ecx, dword [edi]
mov dword [esi + 8], ecx
mov eax, dword [edi]
cmp eax, ebx
je 0x477b39
mov dword [eax + 4], esi
mov dword [edi], esi
mov dword [edi + 4], esi
jmp 0x477be5
mov dword [esp + 0x10], ebx
jmp 0x477aec
cmp dword [edi + 0x38], 0xffb3
jne 0x477b6d
mov eax, dword [edi + 0xc]
cmp dword [eax + 0x44], ebx
je 0x477b6d
lea ecx, [esp + 0x18]
push ecx
mov eax, edi
call fcn.004776a0
add esp, 4
test eax, eax
jne 0x477b87
mov edx, dword [edi + 0x38]
mov eax, dword [edi + 0xc]
push edx
push eax
call fcn.004787c0
mov esi, eax
push ebx
call fcn.00477550
add esp, 0xc
jmp 0x477b8b
mov esi, dword [esp + 0x18]
cmp esi, ebx
jne 0x477b28
push str.memmgr_getmem_internal___failed
push str.pool_getmem
call fcn.00477780
mov eax, dword [0x4e3630]
add esp, 8
cmp eax, ebx
je 0x477bac
call eax
pop edi
pop esi
pop ebp
mov dword [0], 5
xor eax, eax
pop ebx
pop ecx
ret
push str.should_never_have_empty_slots_after_full_pages
push str.pool_getmem
call fcn.00477780
mov eax, dword [0x4e3630]
add esp, 8
cmp eax, ebx
je 0x477bdb
call eax
mov dword [0], 5
movzx eax, word [esi + 0xc]
movzx edx, ax
mov cx, word [esi + edx*8 + 6]
lea ebx, [esi + edx*8]
mov word [esi + 0xc], cx
mov word [ebx + 6], ax
mov byte [ebx + 4], 0x73
add word [esi + 0xe], bp
cmp word [esi + 0xc], 0
jne 0x477c5e
mov eax, dword [edi + 4]
cmp esi, eax
jne 0x477c1a
mov edx, dword [esi + 4]
mov dword [edi + 4], edx
jmp 0x477c5e
mov eax, dword [eax + 8]
cmp esi, dword [edi]
jne 0x477c26
mov ecx, dword [esi + 8]
mov dword [edi], ecx
cmp dword [esi + 4], 0
je 0x477c35
mov edx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov dword [edx + 8], ecx
cmp dword [esi + 8], 0
je 0x477c44
mov edx, dword [esi + 8]
mov ecx, dword [esi + 4]
mov dword [edx + 4], ecx
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x477c4e
mov dword [ecx + 8], esi
mov edx, dword [edi + 4]
mov dword [esi + 4], edx
mov dword [esi + 8], eax
test eax, eax
je 0x477c5e
mov dword [eax + 4], esi
cmp dword [edi + 0x1c], 0
jne 0x477c76
mov eax, dword [edi + 0x2c]
push eax
lea ecx, [ebx + 8]
push 0
push ecx
call fcn.004063f0
add esp, 0xc
mov eax, dword [edi + 0xc]
cmp dword [eax + 0x54], 0
je 0x477cee
cmp dword [eax + 4], 0
je 0x477c8e
cmp dword [0x4e360c], 0
jne 0x477c92
xor ebp, ebp
jmp 0x477caa
mov edx, dword [edi + 0x14]
push edx
call fcn.00476e20
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + 4]
push ecx
call fcn.00476de0
add esp, 8
mov edx, dword [0x4e34f0]
cmp dword [edx + 0x54], 0
je 0x477cce
mov esi, dword [edi + 0xc]
lea eax, [ebx + 8]
push 0x49fc28
push eax
call fcn.00477950
add esp, 8
mov esi, eax
jmp 0x477cd0
xor esi, esi
test ebp, ebp
je 0x477cec
mov ecx, dword [edi + 0xc]
mov edx, dword [ecx + 4]
push edx
call fcn.00476e20
mov eax, dword [edi + 0x14]
push eax
call fcn.00476de0
add esp, 8
mov dword [ebx], esi
cmp dword [esp + 0x10], 0
je 0x477d01
mov ecx, dword [edi + 0x14]
push ecx
call fcn.00476e20
add esp, 4
pop edi
pop esi
pop ebp
lea eax, [ebx + 8]
pop ebx
pop ecx
ret