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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov esi, dword [edx*4 + 0x20a514c]
mov dword [esp + 0x14], esi
cmp word [esi + 0x78], 1
je 0x50cd2a
mov eax, dword [esi + 0x2a8]
test eax, eax
js 0x50d25a
cmp eax, 0x1194
jge 0x50d25a
mov ecx, dword [ebp + 8]
mov edi, dword [ecx*4 + 0x20a514c]
mov dword [esp + 0x10], edi
mov al, byte [edi + 0x149]
cmp al, 0x28
je 0x50cd4e
cmp al, 0x12
jb 0x50cd56
cmp al, 0x17
jbe 0x50cd4e
cmp al, 0x35
jne 0x50cd56
cmp ecx, edx
jne 0x50d25a
movsx eax, word [esi + 0x146]
push eax
movsx eax, word [esi + 0x144]
push eax
movsx eax, word [edi + 0x146]
push eax
movsx eax, word [edi + 0x144]
push eax
mov eax, dword [ebp + 0x10]
movzx eax, word [eax + 8]
push eax
call fcn.00507fe0
test al, al
je 0x50d25a
mov eax, dword [edi + 0x120]
add eax, dword [edi + 0xf4]
cdq
idiv dword [0xbdbf80]
push 0x1a4
mov ebx, eax
add ebx, dword [0xbdbf7c]
push edi
call fcn.004b6100
mov ecx, eax
mov eax, 0x51eb851f
imul ecx, ebx
push 0x1a6
push edi
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add ebx, eax
call fcn.004b6100
mov ecx, eax
mov eax, 0x51eb851f
imul ecx, ebx
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add ebx, eax
cmp word [esi + 0x78], 1
jne 0x50ce03
movzx eax, word [esi + 0xcc]
mov ecx, dword [eax*4 + 0xbdbf84]
jmp 0x50ce08
mov ecx, 0x64
imul ecx, ebx
mov eax, 0x51eb851f
mov ebx, dword [0xbdbfa0]
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp word [edi + 0x78], 1
mov dword [esp + 0x34], eax
jne 0x50ce43
push 0x1a6
push edi
call fcn.005089c0
test eax, eax
je 0x50ce43
movzx eax, byte [eax + 4]
inc eax
jmp 0x50ce45
xor eax, eax
add ebx, eax
mov ecx, 0xbf0bd4
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], ebx
movzx eax, word [eax + 8]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x44]
push eax
call fcn.00405650
mov eax, dword [esp + 0x48]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x50ce8a
mov esi, dword [ebp + 0x10]
movzx edx, word [esi + 8]
mov esi, dword [esp + 0x14]
cmp edx, dword [eax + 0x10]
jge 0x50ce8c
mov eax, ecx
cmp eax, ecx
je 0x50d1c7
mov ecx, dword [eax + 0x54]
mov eax, dword [esp + 0x34]
movzx edx, ax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
test ecx, ecx
js 0x50d1c7
cmp ecx, 0x100
jge 0x50d1c7
imul eax, ecx, 0x4c
cmp dword [eax + 0x6460e4], ecx
lea edi, [eax + 0x6460e4]
jne 0x50d1c3
test edi, edi
je 0x50d1c3
mov eax, dword [edi + 0x38]
cmp eax, 0xffffffff
je 0x50cf04
cmp dword [edi + 0x30], 2
jne 0x50cefe
push 0
call fcn.0052d9f5
mov ebx, dword [edi + 0x38]
add esp, 4
add ebx, eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x18], ebx
jmp 0x50cf04
mov ebx, eax
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x50cf13
movzx eax, ax
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x40]
xor edx, edx
cmp eax, 0xffffffff
movzx ecx, ax
mov esi, dword [esi + 0x624]
cmove ecx, edx
movzx eax, cx
mov dword [esp + 0x24], eax
movzx eax, ax
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, edx
movzx eax, cx
mov dword [esp + 0x38], eax
movzx eax, ax
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0x48]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, edx
movzx eax, cx
xor ecx, ecx
mov dword [esp + 0x40], eax
movzx eax, ax
mov dword [esp + 0x30], eax
nop dword [eax + eax]
mov dl, byte [esi + 4]
cmp dl, 0xff
je 0x50cf85
movzx eax, byte [esi + 5]
cmp eax, dword [edi + 4]
je 0x50d038
inc ecx
add esi, 0x1c
cmp ecx, 0x20
jl 0x50cf70
mov eax, dword [esp + 0x18]
xor ebx, ebx
mov ecx, dword [esp + 0x14]
nop dword [eax + eax]
mov esi, dword [ecx + 0x624]
mov edx, eax
mov al, byte [edi + 0x34]
add esi, ebx
mov byte [esp + 0xd], al
mov al, byte [edi + 0x30]
mov byte [esp + 0xc], al
cmp byte [esi + 4], 0xff
mov al, byte [edi + 0x2c]
mov byte [esp + 0xe], al
mov al, byte [edi + 4]
mov byte [esp + 0xf], al
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], 0
jne 0x50d024
mov cl, byte [esp + 0xc]
cmp cl, 2
jne 0x50d155
push 0
mov dword [esp + 0x28], eax
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push dword [esp + 0x24]
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x40]
movsd xmm0, qword [esp + 0x40]
call fcn.00546020
mov edx, eax
test edx, edx
jg 0x50d151
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
add ebx, 0x1c
cmp ebx, 0x380
jl 0x50cfa0
jmp 0x50d1c3
movzx eax, dl
cmp dword [esp + 0x20], eax
jne 0x50d079
mov eax, dword [esp + 0x1c]
cmp ax, word [esi + 0x14]
jb 0x50d1c3
mov eax, dword [esp + 0x24]
cmp ax, word [esi + 0x16]
jb 0x50d1c3
mov eax, dword [esp + 0x38]
cmp ax, word [esi + 0x18]
jb 0x50d1c3
mov eax, dword [esp + 0x40]
cmp ax, word [esi + 0x1a]
jb 0x50d1c3
push esi
push dword [esp + 0x18]
mov ecx, 0x6460e0
call fcn.00478000
movzx eax, byte [esi + 4]
mov ecx, 0x6460e0
push eax
movzx eax, byte [esi + 5]
push 0
push 2
push 0
push eax
push dword [esp + 0x28]
call fcn.00478bb0
xor eax, eax
mov dword [esi + 4], 0xff
mov dword [esi + 0x10], 0
xor edx, edx
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov al, byte [edi + 0x34]
mov cl, byte [edi + 0x30]
mov byte [esp + 0xf], al
mov al, byte [edi + 0x2c]
mov byte [esp + 0xd], al
mov al, byte [edi + 4]
mov byte [esp + 0xe], cl
mov byte [esp + 0xc], al
cmp cl, 2
jne 0x50d125
push edx
mov dword [esp + 0x44], ebx
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push ebx
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x38]
movsd xmm0, qword [esp + 0x38]
call fcn.00546020
mov ebx, eax
test ebx, ebx
jle 0x50d1c3
mov al, byte [esp + 0xc]
mov edx, dword [esp + 0x40]
mov ah, byte [esp + 0xd]
mov cl, byte [esp + 0x20]
mov byte [esi + 6], ah
mov ah, byte [esp + 0xe]
mov byte [esi + 7], ah
mov ah, byte [esp + 0xf]
push ecx
mov byte [esi + 5], al
mov byte [esi + 8], ah
mov byte [esi + 4], cl
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ebx
push ebx
movzx eax, al
jmp 0x50d183
mov cl, byte [esp + 0xc]
mov al, byte [esp + 0x20]
mov ch, byte [esp + 0xe]
mov bl, byte [esp + 0xf]
mov byte [esi + 7], cl
mov cl, byte [esp + 0xd]
push eax
mov byte [esi + 6], ch
mov byte [esi + 8], cl
mov ecx, dword [esp + 0x28]
mov byte [esi + 4], al
mov byte [esi + 5], bl
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], edx
push edx
movzx eax, bl
mov edi, dword [esp + 0x24]
mov ecx, 0x6460e0
mov ebx, dword [esp + 0x1c]
mov word [esi + 0x14], di
mov edi, dword [esp + 0x30]
push 0
mov word [esi + 0x16], di
mov edi, dword [esp + 0x38]
push 0
mov word [esi + 0x18], di
mov edi, dword [esp + 0x40]
push eax
push ebx
mov word [esi + 0x1a], di
call fcn.00478bb0
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00477580
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x34]
xor esi, esi
nop dword [eax]
mov eax, dword [edi + 0x368]
cmp byte [esi + eax], 0
je 0x50d231
cmp byte [esi + eax + 3], 2
jne 0x50d231
movsx eax, word [esi + eax + 1]
mov edi, dword [eax*4 + 0x20a514c]
cmp dword [edi + 0xe40], 0
je 0x50d22d
mov edx, dword [esp + 0x10]
lea eax, [edi + 0xe60]
xor ecx, ecx
mov edx, dword [edx]
cmp dword [eax], edx
je 0x50d215
inc ecx
add eax, 8
cmp ecx, 0x14
jl 0x50d206
jmp 0x50d22d
mov eax, 0x66666667
imul ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add dword [edi + ecx*8 + 0xe64], eax
mov edi, dword [esp + 0x10]
add esi, 4
cmp esi, 0x12c
jl 0x50d1d0
mov eax, dword [ebp + 0x10]
push 1
push dword [ebp + 0xc]
movzx eax, word [eax + 8]
push eax
push edi
call fcn.00517480
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc