Function at 0x50b3c0
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Enumerate pe sections
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
lea edi, [ebp - 0x2e]
xor eax, eax
push ebp
push 0x50b611
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, edi
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 2]
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 4]
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 6]
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 8]
mov ecx, 4
mov eax, esi
call fcn.0050b054
lea edx, [edi + 0xc]
mov ecx, 4
mov eax, esi
call fcn.0050b054
lea edx, [edi + 0x10]
mov ecx, 4
mov eax, esi
call fcn.0050b054
lea edx, [edi + 0x14]
mov ecx, 4
mov eax, esi
call fcn.0050b054
lea edx, [edi + 0x18]
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 0x1a]
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 0x1c]
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 0x1e]
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 0x20]
mov ecx, 2
mov eax, esi
call fcn.0050b020
lea edx, [edi + 0x22]
mov ecx, 4
mov eax, esi
call fcn.0050b054
lea edx, [edi + 0x26]
mov ecx, 4
mov eax, esi
call fcn.0050b054
mov ax, word [edi]
mov word [ebx + 4], ax
mov ax, word [edi + 2]
mov word [ebx + 6], ax
mov ax, word [edi + 4]
mov word [ebx + 8], ax
mov ax, word [edi + 6]
mov word [ebx + 0xa], ax
mov eax, dword [edi + 8]
mov dword [ebx + 0xc], eax
mov eax, dword [edi + 0xc]
mov dword [ebx + 0x10], eax
mov eax, dword [edi + 0x10]
xor edx, edx
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
mov eax, dword [edi + 0x14]
xor edx, edx
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], edx
movzx eax, word [edi + 0x1e]
mov dword [ebx + 0x28], eax
mov ax, word [edi + 0x20]
mov word [ebx + 0x2c], ax
mov eax, dword [edi + 0x22]
mov dword [ebx + 0x30], eax
mov eax, dword [edi + 0x26]
xor edx, edx
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], edx
mov ax, word [edi + 0x18]
test ax, ax
jbe 0x50b57e
movzx edx, ax
lea eax, [ebp - 4]
call fcn.004050e4
movzx ecx, word [edi + 0x18]
lea edx, [ebp - 4]
mov eax, esi
call fcn.0050afe4
lea edx, [ebp - 4]
mov eax, dword [0x50ae58]
call fcn.0050db2c
lea eax, [ebp - 0x34]
push eax
mov eax, ebx
call fcn.0050b3b8
mov ecx, eax
mov edx, dword [ebp - 4]
mov eax, dword [0x50ae58]
call fcn.0050cabc
mov edx, dword [ebp - 0x34]
lea eax, [ebx + 0x40]
call fcn.004051e0
mov ax, word [edi + 0x1a]
test ax, ax
jbe 0x50b5a7
movzx edx, ax
lea eax, [ebx + 0x48]
call fcn.004050e4
movzx ecx, word [edi + 0x1a]
lea edx, [ebx + 0x48]
mov eax, esi
call fcn.0050afe4
mov eax, ebx
call fcn.0050b808
mov ax, word [edi + 0x1c]
test ax, ax
jbe 0x50b5ee
movzx edx, ax
lea eax, [ebp - 4]
call fcn.004050e4
movzx ecx, word [edi + 0x1c]
lea edx, [ebp - 4]
mov eax, esi
call fcn.0050afe4
lea eax, [ebp - 0x38]
push eax
mov eax, ebx
call fcn.0050b3b8
mov ecx, eax
mov edx, dword [ebp - 4]
mov eax, dword [0x50ae58]
call fcn.0050cabc
mov edx, dword [ebp - 0x38]
lea eax, [ebx + 0x44]
call fcn.004051e0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50b618
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.004051bc
lea eax, [ebp - 4]
call fcn.00404a88
ret