Function at 0x4056d0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x18
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push ebx
call fcn.00409160
mov edx, dword [ebp + 8]
add esp, 0x10
mov dword [ebp - 0x14], eax
movzx eax, byte [edx]
mov ecx, dword [ebp - 0x14]
and al, 0xf
movzx eax, al
shl eax, 2
add dword [ecx + 0x1c], eax
sub dword [ecx + 0x20], eax
test edi, edi
je 0x405951
mov ebx, dword [edi + 0xc]
cmp edi, ebx
je 0x405732
mov ecx, dword [ebp + 8]
movzx eax, word [ecx + 6]
cmp word [ebx + 6], ax
jbe 0x405726
jmp 0x405734
cmp word [ebx + 6], ax
ja 0x405734
mov ebx, dword [ebx + 0xc]
cmp edi, ebx
nop
lea esi, [esi]
jne 0x405720
mov ebx, edi
mov edx, dword [ebx + 0x10]
cmp edi, edx
je 0x4057ac
movzx eax, word [edx + 6]
movzx edx, word [edx + 2]
lea esi, [eax + edx]
mov edx, dword [ebp + 8]
movzx eax, word [edx + 6]
sub esi, eax
test esi, esi
jle 0x4057ac
movzx eax, word [edx + 2]
cmp esi, eax
jl 0x40577c
mov edx, dword [ebp - 0x14]
sub esp, 0xc
xor ebx, ebx
inc dword [0x4133ac]
push edx
call fcn.004092c0
add esp, 0x10
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push edx
call fcn.00409160
pop edx
pop ecx
push esi
push eax
call fcn.00409130
mov ecx, dword [ebp + 8]
movzx edx, si
add esp, 0x10
movzx eax, word [ecx + 6]
lea eax, [edx + eax]
mov word [ecx + 6], ax
movzx eax, word [ecx + 2]
sub eax, edx
mov word [ecx + 2], ax
cmp edi, ebx
je 0x40594a
mov eax, dword [ebp + 8]
movzx edx, word [eax + 2]
movzx eax, word [eax + 6]
add edx, eax
movzx eax, word [ebx + 6]
cmp edx, eax
jg 0x405810
jmp 0x405844
mov ebx, dword [ebx + 0xc]
sub esp, 0xc
mov eax, dword [ebx + 0x10]
push eax
call fcn.00409160
mov dword [esp], eax
call fcn.004092c0
mov eax, dword [ebx + 0x10]
push eax
call fcn.00405570
add esp, 0x14
cmp edi, ebx
je 0x40594a
mov ecx, dword [ebp + 8]
movzx eax, word [ecx + 2]
movzx edx, word [ecx + 6]
add edx, eax
movzx eax, word [ebx + 6]
cmp edx, eax
jle 0x405844
mov esi, edx
movzx edx, word [ebx + 2]
sub esi, eax
cmp esi, edx
jge 0x4057d0
movzx eax, si
sub esp, 0xc
sub edx, eax
mov word [ebx + 2], dx
movzx edx, word [ebx + 6]
add eax, edx
mov word [ebx + 6], ax
push ebx
call fcn.00409160
pop edx
pop ecx
push esi
push eax
call fcn.00409130
add esp, 0x10
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.00405550
mov ebx, dword [edi + 0xc]
pop esi
xor esi, esi
pop eax
cmp ebx, edi
je 0x40587f
cmp word [ebx + 6], 0
mov edx, ebx
je 0x405872
jmp 0x405888
movzx eax, word [edx + 6]
cmp eax, esi
lea esi, [esi]
jne 0x405888
movzx eax, word [edx + 2]
mov edx, dword [edx + 0xc]
add esi, eax
cmp edi, edx
jne 0x405867
mov eax, dword [edi + 0x10]
test byte [eax + 1], 1
je 0x405894
lea esp, [ebp - 0xc]
xor ebx, ebx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push ebx
call fcn.00409160
add esp, 0x10
mov dword [ebp - 0x10], eax
mov ebx, dword [ebx + 0xc]
cmp ebx, edi
je 0x4058cf
lea esi, [esi]
sub esp, 0xc
push ebx
call fcn.00409160
mov ebx, dword [ebx + 0xc]
pop edx
pop ecx
push eax
mov eax, dword [ebp - 0x10]
push eax
call fcn.00409350
add esp, 0x10
cmp ebx, edi
jne 0x4058b0
mov eax, dword [ebp - 0x10]
mov edx, dword [edi + 0xc]
test byte [eax + 0x10], 1
je 0x4058e8
mov ecx, dword [ebp - 0x10]
add eax, 0x24
sub edx, eax
mov ebx, dword [ecx + 0x24]
add edx, ebx
and byte [edx + 1], 0xfe
sub esp, 0xc
mov ebx, edx
mov word [edx + 2], si
mov eax, dword [edi + 0x14]
mov dword [edx + 0xc], eax
mov eax, dword [edi + 0x18]
mov dword [edx + 0x10], eax
push edi
call fcn.004094b0
mov dword [esp], edi
call fcn.00409160
mov dword [esp], eax
call fcn.004092c0
mov dword [esp], ebx
call fcn.00409160
movzx edx, byte [ebx]
add esp, 0x10
and dl, 0xf
movzx edx, dl
shl edx, 2
add dword [eax + 0x20], edx
movzx edx, byte [ebx]
and dl, 0xf
movzx edx, dl
shl edx, 2
sub dword [eax + 0x1c], edx
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, edi
jmp 0x405844
call fcn.004093d0
test eax, eax
je 0x40575b
mov edi, dword [eax + 0x1c]
sub esp, 8
push 0x413550
push edi
mov ebx, edi
call fcn.00409490
add esp, 0x10
mov byte [edi + 8], 0x3c
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 9]
mov byte [edi + 9], al
mov eax, dword [edx + 4]
mov dword [edi + 0x10], edi
mov dword [edi + 0xc], edi
mov word [edi + 0xa], ax
mov eax, dword [edx + 0xc]
mov dword [edi + 0x14], eax
mov eax, dword [edx + 0x10]
mov dword [edi + 0x18], eax
jmp 0x405844