Function at 0x509a80
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x38]
cmp eax, dword [ecx + 8]
jbe 0x509df2
sub esp, 0xb8
mov eax, dword [esp + 0xc0]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
movzx ebx, byte [eax + 2]
movzx ebp, byte [eax + 3]
movzx esi, byte [eax + 4]
mov dword [esp + 0xb4], esi
movzx edi, byte [eax + 5]
movzx esi, byte [eax + 6]
mov dword [esp + 0xb0], esi
movzx esi, byte [eax + 7]
mov dword [esp + 0xac], esi
movzx esi, byte [eax + 8]
mov dword [esp + 0xa8], esi
movzx esi, byte [eax + 9]
mov dword [esp + 0xa4], esi
movzx esi, byte [eax + 0xa]
mov dword [esp + 0xa0], esi
movzx esi, byte [eax + 0xb]
mov dword [esp + 0x9c], esi
movzx esi, byte [eax + 0xc]
mov dword [esp + 0x98], esi
movzx esi, byte [eax + 0xd]
mov dword [esp + 0x94], esi
movzx esi, byte [eax + 0xe]
mov dword [esp + 0x90], esi
movzx esi, byte [eax + 0xf]
mov dword [esp + 0x8c], esi
movzx esi, byte [eax + 0x10]
mov dword [esp + 0x88], esi
movzx esi, byte [eax + 0x11]
mov dword [esp + 0x84], esi
movzx esi, byte [eax + 0x12]
mov dword [esp + 0x80], esi
movzx esi, byte [eax + 0x13]
mov dword [esp + 0x7c], esi
movzx esi, byte [eax + 0x14]
mov dword [esp + 0x78], esi
movzx esi, byte [eax + 0x15]
mov dword [esp + 0x74], esi
movzx esi, byte [eax + 0x16]
mov dword [esp + 0x70], esi
movzx esi, byte [eax + 0x17]
mov dword [esp + 0x6c], esi
movzx esi, byte [eax + 0x18]
mov dword [esp + 0x68], esi
movzx esi, byte [eax + 0x19]
mov dword [esp + 0x64], esi
movzx esi, byte [eax + 0x1a]
mov dword [esp + 0x60], esi
movzx esi, byte [eax + 0x1b]
mov dword [esp + 0x5c], esi
movzx esi, byte [eax + 0x1c]
mov dword [esp + 0x58], esi
movzx esi, word [eax + 0x1d]
mov word [esp + 0x56], si
movzx eax, byte [eax + 0x1f]
mov esi, dword [esp + 0xbc]
mov dword [esp], esi
mov esi, edx
shl edx, 8
or ecx, edx
mov edx, ebx
shl ebx, 0x10
or ecx, ebx
mov ebx, ebp
shl ebp, 0x18
or ebp, ecx
mov dword [esp + 4], ebp
shr esi, 0x18
shr edx, 0x10
or edx, esi
shr ebx, 8
or edx, ebx
mov dword [esp + 8], edx
mov ecx, edi
shl edi, 8
mov edx, dword [esp + 0xb4]
or edx, edi
mov ebx, dword [esp + 0xb0]
mov ebp, ebx
shl ebx, 0x10
or edx, ebx
mov ebx, edx
shl edx, 6
mov dword [esp + 0xc], edx
shr ecx, 0x18
shr ebp, 0x10
or ecx, ebp
shl ecx, 6
shr ebx, 0x1a
or ebx, ecx
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0xa8]
mov edx, ecx
shl ecx, 8
mov ebx, dword [esp + 0xac]
or ebx, ecx
mov ecx, dword [esp + 0xa4]
mov ebp, ecx
shl ecx, 0x10
or ebx, ecx
mov ecx, ebx
shl ebx, 5
mov dword [esp + 0x14], ebx
shr edx, 0x18
shr ebp, 0x10
or edx, ebp
shl edx, 5
shr ecx, 0x1b
or edx, ecx
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x9c]
mov edx, ecx
shl ecx, 8
mov ebx, dword [esp + 0xa0]
or ebx, ecx
mov ecx, dword [esp + 0x98]
mov ebp, ecx
shl ecx, 0x10
or ebx, ecx
mov ecx, ebx
shl ebx, 3
mov dword [esp + 0x1c], ebx
shr edx, 0x18
shr ebp, 0x10
or edx, ebp
shl edx, 3
shr ecx, 0x1d
or ecx, edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x90]
mov edx, ecx
shl ecx, 8
mov ebx, dword [esp + 0x94]
or ebx, ecx
mov ecx, dword [esp + 0x8c]
mov ebp, ecx
shl ecx, 0x10
or ebx, ecx
mov ecx, ebx
shl ebx, 2
mov dword [esp + 0x24], ebx
shr edx, 0x18
shr ebp, 0x10
or edx, ebp
shl edx, 2
shr ecx, 0x1e
or edx, ecx
mov dword [esp + 0x28], edx
mov ecx, dword [esp + 0x84]
mov edx, ecx
shl ecx, 8
mov ebx, dword [esp + 0x88]
or ebx, ecx
mov ecx, dword [esp + 0x80]
mov ebp, ecx
shl ecx, 0x10
or ebx, ecx
mov ecx, dword [esp + 0x7c]
mov esi, ecx
shl ecx, 0x18
or ecx, ebx
mov dword [esp + 0x2c], ecx
shr edx, 0x18
shr ebp, 0x10
or edx, ebp
shr esi, 8
or edx, esi
mov dword [esp + 0x30], edx
mov ecx, dword [esp + 0x74]
mov edx, ecx
shl ecx, 8
mov ebx, dword [esp + 0x78]
or ebx, ecx
mov ecx, dword [esp + 0x70]
mov ebp, ecx
shl ecx, 0x10
or ebx, ecx
mov ecx, ebx
shl ebx, 7
mov dword [esp + 0x34], ebx
shr edx, 0x18
shr ebp, 0x10
or ebp, edx
shl ebp, 7
shr ecx, 0x19
or ecx, ebp
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x68]
mov edx, ecx
shl ecx, 8
mov ebx, dword [esp + 0x6c]
or ebx, ecx
mov ecx, dword [esp + 0x64]
mov ebp, ecx
shl ecx, 0x10
or ebx, ecx
mov ecx, ebx
shl ebx, 5
mov dword [esp + 0x3c], ebx
shr edx, 0x18
shr ebp, 0x10
or ebp, edx
shl ebp, 5
shr ecx, 0x1b
or ecx, ebp
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x5c]
mov edx, ecx
shl ecx, 8
mov ebx, dword [esp + 0x60]
or ebx, ecx
mov ecx, dword [esp + 0x58]
mov ebp, ecx
shl ecx, 0x10
or ebx, ecx
mov ecx, ebx
shl ebx, 4
mov dword [esp + 0x44], ebx
shr edx, 0x18
shr ebp, 0x10
or ebp, edx
shl ebp, 4
shr ecx, 0x1c
or ecx, ebp
mov dword [esp + 0x48], ecx
shl eax, 0x10
movzx ecx, word [esp + 0x56]
or ecx, eax
and ecx, 0x7fffff
mov eax, ecx
shl ecx, 2
mov dword [esp + 0x4c], ecx
shr eax, 0x1e
mov dword [esp + 0x50], eax
call fcn.0050a190
add esp, 0xb8
ret
call fcn.0045b380
jmp fcn.00509a80