Function at 0x5015e5
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov ebx, ecx
mov dword [ebp - 0x1c], esi
cmp dword [edi + 4], esi
jne 0x50164b
cmp dword [edi + 0x28], esi
je 0x50164b
mov esi, dword [ebp + 0xc]
push esi
push dword [edi + 8]
call fcn.00501480
mov eax, dword [edi + 0x2c]
test esi, esi
je 0x501622
mov ecx, dword [ebx + 0xc]
push esi
add ecx, 0x2c
push eax
call fcn.004f9ce2
push ecx
xor ecx, ecx
push ecx
mov ecx, eax
call fcn.004fbe6c
push eax
lea ecx, [ebp - 0x30]
call fcn.00502554
push dword [ebp + 0x10]
mov eax, ecx
mov ecx, ebx
push eax
push dword [edi + 0x28]
call fcn.00501c23
jmp 0x50199b
mov eax, dword [edi + 0x88]
and eax, 0xfc
cmp eax, 0xc
jne 0x501693
mov ecx, edi
call fcn.004dcbb4
test al, al
jne 0x5016ba
mov esi, dword [edi + 0x78]
mov ecx, ebx
push 1
push dword [ebp + 0xc]
push esi
call fcn.00501c23
lea ecx, [ebx + 0x28]
mov eax, 0x5019a4
cmp dword [esi + 0x7c], edi
je 0x501688
mov eax, 0x5019b0
push eax
call fcn.00566517
jmp 0x50199b
cmp eax, 0x10
jne 0x5016ba
mov esi, dword [edi + 0x78]
push 1
push dword [ebp + 0xc]
push esi
call fcn.00501c23
lea ecx, [ebx + 0x28]
mov eax, 0x5019bc
cmp dword [esi + 0x24], edi
je 0x501688
mov eax, 0x5019c8
jmp 0x501688
lea eax, [ebp - 4]
mov dword [ebp - 4], esi
push eax
push dword [ebp + 0xc]
mov ecx, ebx
push edi
call fcn.00501389
mov eax, dword [edi + 0x88]
and eax, 0xfc
cmp eax, 4
je 0x5016eb
cmp eax, 8
jne 0x5016fb
lea ecx, [ebx + 0x28]
push 0x7e
call fcn.005665a8
mov ecx, dword [edi + 8]
call fcn.004db698
push dword [eax + 4]
jmp 0x5017ed
cmp eax, 0x14
je 0x501905
cmp eax, 0x18
jne 0x501713
mov eax, 0x489264
jmp 0x50190a
test dword [edi + 0x24], 0x200000
je 0x50177a
push 0x5019f0
lea ecx, [ebx + 0x28]
call fcn.00566517
mov eax, dword [ebx + 0xc]
mov edx, dword [edi + 4]
mov ecx, dword [eax]
call fcn.00502edb
imul eax, eax, 0x1c
mov eax, dword [eax + 0x486980]
cmp eax, 0x8b
je 0x501751
shl eax, 4
mov eax, dword [eax + 0x485d40]
jmp 0x50176c
mov eax, dword [ebx + 0xc]
push 0x37
mov ecx, dword [eax]
call fcn.004a84ac
cmp dword [edi + 4], eax
mov eax, 0x489cfc
je 0x50176c
mov eax, 0x501a04
push eax
lea ecx, [ebx + 0x28]
call fcn.00566517
jmp 0x50192e
cmp dword [edi + 4], esi
jne 0x5017ad
cmp dword [edi + 0x30], esi
je 0x501790
push ecx
push dword [ebp + 0xc]
push dword [edi + 0x30]
jmp 0x501927
mov ecx, edi
call fcn.004dc8a4
mov ecx, eax
call fcn.00564d40
mov ecx, ebx
push dword [eax + 0x48]
call fcn.00500e6e
jmp 0x50192e
mov eax, dword [ebx + 0xc]
push edi
mov ecx, dword [eax + 0x128]
mov ecx, dword [ecx + 4]
call fcn.004de81d
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x38]
mov ecx, dword [edi + 4]
mov esi, eax
mov dword [ebp - 0x14], esi
call fcn.0055561c
mov dword [ebp - 0x18], eax
cmp eax, 0xb
je 0x5017f9
cmp eax, 0x17
je 0x5017f9
mov ecx, dword [esi + 4]
shr ecx, 1
test cl, 1
jne 0x5017f9
push dword [edi + 4]
mov ecx, ebx
call fcn.00501314
jmp 0x50192e
mov eax, dword [ebx + 0xc]
xor edx, edx
mov dword [ebp - 0xc], edx
mov ecx, dword [eax]
mov eax, dword [esi + 4]
shr eax, 1
test al, 1
je 0x501815
push edx
mov edx, dword [edi + 8]
mov edx, dword [edx + 4]
jmp 0x50181c
mov edx, dword [edi + 4]
lea eax, [ebp - 0xc]
push eax
call fcn.00555642
push eax
mov ecx, ebx
call fcn.00501314
mov esi, dword [ebp - 4]
test esi, esi
je 0x501899
xor eax, eax
cmp dword [esi + 0x14], eax
je 0x501899
lea ecx, [ebx + 0x28]
push 0x3c
call fcn.005665a8
push ecx
push dword [ebp + 0xc]
mov ecx, ebx
push dword [esi + 0x18]
call fcn.00501e74
xor ecx, ecx
mov eax, esi
inc ecx
mov dword [ebp - 0x10], ecx
cmp dword [eax + 0x14], ecx
jle 0x50188f
add eax, 0x1c
mov dword [ebp - 8], eax
push 0x489568
lea ecx, [ebx + 0x28]
call fcn.00566517
mov eax, dword [ebp - 8]
push ecx
push dword [ebp + 0xc]
mov ecx, ebx
push dword [eax]
call fcn.00501e74
mov eax, dword [ebp - 0x10]
add dword [ebp - 8], 4
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [esi + 0x14]
jl 0x501862
push 0x3e
lea ecx, [ebx + 0x28]
call fcn.005665a8
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 4]
shr eax, 1
test al, 1
jne 0x50192e
cmp dword [ebp - 0x18], 0x17
lea esi, [ebx + 0x28]
je 0x5018be
push 0x489594
mov ecx, esi
call fcn.00566517
mov eax, dword [ebx + 0xc]
push 0xf5
mov ecx, dword [eax]
call fcn.004a84ac
push eax
mov ecx, ebx
call fcn.00501314
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x50192e
mov edx, eax
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 0x1c]
jne 0x5018e1
sub edx, ecx
mov ecx, esi
sar edx, 1
push edx
call fcn.005665c9
push dword [ebp - 0xc]
mov ecx, esi
call fcn.00439500
jmp 0x50192e
mov eax, 0x489250
push eax
lea ecx, [ebx + 0x28]
call fcn.00566517
push 0x5019d8
lea ecx, [ebx + 0x28]
call fcn.00566517
push ecx
push dword [ebp + 0xc]
push dword [edi + 0x3c]
mov ecx, ebx
call fcn.00501e74
cmp dword [ebp - 4], 0
jne 0x501942
push ecx
push dword [ebp + 0xc]
mov ecx, ebx
push dword [edi + 0x48]
call fcn.00501566
cmp byte [ebp + 0x10], 0
je 0x50199b
push 0x28
lea ecx, [ebx + 0x28]
call fcn.005665a8
mov ecx, edi
call fcn.004db41a
test al, al
jne 0x501991
mov eax, dword [edi + 0x24]
mov ecx, dword [ebx + 0xc]
shr eax, 0x16
add ecx, 0x2c
and al, 1
movzx eax, al
push eax
mov eax, dword [edi + 0x88]
shr eax, 0x11
and al, 1
movzx eax, al
push eax
push dword [ebp + 0xc]
push dword [edi + 0x40]
call fcn.004f9b73
push eax
mov ecx, ebx
call fcn.005011a7
push 0x29
lea ecx, [ebx + 0x28]
call fcn.005665a8
pop edi
pop esi
pop ebx
leave
ret 0xc