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

Disassembly:
push ecx
mov eax, dword [esp + 8]
push esi
push 4
mov esi, dword [eax + 0x3c]
add esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x5104dd
xor al, al
pop esi
pop ecx
ret
cmp dword [esi], 0x4550
je 0x5104ea
xor al, al
pop esi
pop ecx
ret
mov ecx, dword [esi + 0x28]
lea eax, [esi + 0x28]
push ebx
push ebp
push edi
mov edi, dword [esp + 0x1c]
test ecx, ecx
je 0x510507
mov edx, dword [edi]
mov ecx, edi
sub eax, edx
push eax
call fcn.00510720
mov ecx, dword [esi + 0x2c]
lea eax, [esi + 0x2c]
test ecx, ecx
je 0x51051d
mov edx, dword [edi]
mov ecx, edi
sub eax, edx
push eax
call fcn.00510720
mov ecx, dword [esi + 0x30]
lea eax, [esi + 0x30]
test ecx, ecx
je 0x510533
mov edx, dword [edi]
mov ecx, edi
sub eax, edx
push eax
call fcn.00510720
lea eax, [esi + 0x50]
mov ecx, edi
push eax
call fcn.005107e0
lea ecx, [esi + 0x54]
push ecx
mov ecx, edi
call fcn.005107e0
mov eax, dword [esi + 0x74]
xor ebx, ebx
test eax, eax
jbe 0x510568
lea ebp, [esi + 0x78]
push ebp
mov ecx, edi
call fcn.005107e0
mov eax, dword [esi + 0x74]
inc ebx
add ebp, 8
cmp ebx, eax
jb 0x510555
xor eax, eax
xor edx, edx
mov ax, word [esi + 0x14]
mov dx, word [esi + 6]
push edi
push 1
lea ecx, [eax + esi + 0x18]
push edx
push ecx
call fcn.00510100
mov eax, dword [esi + 0xa8]
add esp, 0x10
test eax, eax
mov dword [esp + 0x1c], eax
je 0x510645
xor edx, edx
xor ebp, ebp
mov dx, word [esi + 0x14]
cmp word [esi + 6], bp
lea ebx, [edx + esi + 0x18]
jbe 0x5105cb
push 8
push str..debug
push ebx
call fcn.0051e0d0
add esp, 0xc
test eax, eax
je 0x5105f9
xor eax, eax
inc ebp
mov ax, word [esi + 6]
add ebx, 0x28
cmp ebp, eax
jb 0x5105a9
mov edx, dword [esp + 0x1c]
push esi
push edx
call fcn.00511c70
add esp, 8
test eax, eax
je 0x510645
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esi + 0xac]
push esi
push ebp
call fcn.00511c70
add esp, 8
test eax, eax
jne 0x510625
xor ecx, ecx
jmp 0x510635
test ebx, ebx
je 0x5105cb
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebx + 0xc]
cmp eax, ecx
jne 0x5105cb
mov ecx, dword [ebx + 0x14]
mov ebx, dword [esp + 0x18]
mov eax, dword [esi + 0xac]
add ecx, ebx
lea ebx, [eax*8]
sub ebx, eax
shl ebx, 2
jmp 0x510635
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x18]
sub ecx, edx
add ecx, ebp
add ecx, eax
mov eax, dword [esp + 0x18]
push edi
push eax
push ebx
push ecx
call fcn.005101c0
add esp, 0x10
mov ebx, dword [esp + 0x18]
push edi
push esi
push ebx
call fcn.00510440
mov eax, dword [esi + 0x80]
add esp, 0xc
test eax, eax
je 0x510705
push ebx
push esi
push eax
call fcn.00511c00
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x510705
lea ebp, [ebx + 0xc]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x510687
cmp dword [ebp], 0
je 0x510705
push ebp
mov ecx, edi
call fcn.005107e0
lea eax, [ebp + 4]
mov ecx, edi
push eax
call fcn.005107e0
push ebx
mov ecx, edi
call fcn.005107e0
push ebx
mov ecx, edi
call fcn.005107e0
mov eax, dword [ebx]
mov ecx, dword [ebp + 4]
test eax, eax
mov dword [esp + 0x1c], ecx
jne 0x5106bd
test ecx, ecx
mov eax, ecx
je 0x510705
mov ecx, dword [esp + 0x18]
push ecx
push esi
push eax
call fcn.00511c00
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
je 0x510705
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
push edx
push esi
push eax
call fcn.00511c00
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push edi
push ecx
push ebx
push esi
push eax
push edx
call fcn.00511cc0
add esp, 0x24
add ebx, 0x14
add ebp, 0x14
jmp 0x51067a
mov eax, dword [esp + 0x18]
push edi
push esi
push eax
call fcn.00511980
add esp, 0xc
mov al, 1
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret