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

Disassembly:
sub esp, 0x88
mov eax, dword [0x5b3480]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0xb4]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xac]
mov ebp, dword [esp + 0xb8]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xb0]
mov esi, dword [esp + 0x9c]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0xbc]
mov edx, dword [esp + 0xc8]
add eax, ebp
mov ebx, dword [esi + 4]
mov dword [esp + 0x58], ebx
mov ebx, dword [esi + 0xc]
mov dword [esp + 0x78], ebx
mov ebx, dword [esi + 8]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x74]
mov edi, dword [esp + 0xa8]
mov dword [esp + 0x54], ebp
lea eax, [ecx + ebx]
mov dword [esp + 0x18], ebx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x6c], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x18]
mov dword [esp + 0x44], eax
mov eax, dword [ecx + 0x34]
mov dword [esp + 0x7c], eax
xor eax, eax
cmp dword [edi], 2
mov dword [esp + 0x1c], edx
mov edx, dword [esi]
sete al
mov dword [esp + 0x20], eax
xor ebp, ebp
mov eax, dword [esp + 0x30]
xor ebx, ebx
add eax, 0x408
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], 1
mov dword [esp + 0x50], ebp
mov dword [esp + 0x4c], eax
jmp 0x510048
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
cmp edx, dword [esp + 0x58]
jne 0x510059
mov edx, 1
mov dword [esp + 0x48], edx
jmp 0x510092
mov eax, dword [esp + 0x28]
xor edx, edx
lea ecx, [eax + ebp*8]
mov eax, dword [esp + 0x58]
add eax, 0xfffffff8
cmp ecx, eax
movzx eax, word [ecx + 4]
sete dl
sub ecx, dword [esi]
sar ecx, 3
mov dword [esp + 0x48], edx
cmp dword [esi + 0x28], ecx
jne 0x51008b
cmp dword [esi + 0x24], 1
jne 0x51008b
add eax, 0x10000
add ebx, eax
inc ebp
mov dword [esp + 0x50], ebp
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x38]
sub eax, ecx
test edx, edx
mov dword [esp + 0x34], 0xff
cmove eax, ebx
mov ebx, eax
mov eax, dword [edi]
mov dword [esp + 0x64], ebx
test eax, eax
jne 0x5100bd
mov esi, dword [esp + 0x1c]
mov edi, ebx
jmp 0x510122
cmp eax, 1
jne 0x5100ca
mov esi, dword [esp + 0x1c]
mov edi, eax
jmp 0x510122
cmp eax, 2
je 0x5100dc
cmp eax, 3
je 0x5100dc
mov esi, dword [esp + 0x1c]
xor edi, edi
jmp 0x510122
push dword [esp + 0xcc]
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x38]
push esi
push ebx
push ecx
push eax
push esi
call fcn.00507230
add esp, 0x18
cmp eax, 0xffffff88
jbe 0x510101
mov edi, ebx
jmp 0x510122
push dword [esp + 0x34]
push esi
push dword [esp + 0x38]
call fcn.00509b40
add esp, 0xc
cmp dword [esp + 0x20], 0
je 0x51011f
add eax, dword [edi + 0x84]
lea edi, [eax + 3]
test ebp, ebp
jne 0x51012e
lea esi, [ebp + 6]
jmp 0x5101f0
push dword [esp + 0xcc]
mov eax, dword [esp + 0x14]
push esi
push 0x1c
push 5
push 0x59d088
push 0
push dword [esp + 0x64]
push ebp
push 0x1f
push dword [esp + 0x68]
push dword [eax + 0x8c]
call fcn.00510660
push dword [esp + 0xf8]
mov esi, eax
mov eax, dword [esp + 0x7c]
push dword [esp + 0x4c]
add eax, 0x8b0
push 0x23
push 6
push 0x59cf98
push 0x59cf70
push eax
mov eax, dword [esp + 0x58]
push ebp
push 0x23
push dword [esp + 0x8c]
push dword [eax + 0x88]
call fcn.00510660
add esp, 0x58
add esi, eax
mov eax, dword [esp + 0x4c]
add eax, 0x304
push dword [esp + 0xcc]
push dword [esp + 0x20]
push 0x34
push 6
push 0x59d018
push 0x59cfe0
push eax
mov eax, dword [esp + 0x2c]
push ebp
push 0x34
push dword [esp + 0x64]
push dword [eax + 0x90]
call fcn.00510660
add esp, 0x2c
add esi, eax
cmp dword [esp + 0x2c], 0
je 0x5101ed
mov eax, dword [esp + 0x10]
add esi, dword [eax + 0x11c]
add esi, 6
lea eax, [esi + edi]
cmp eax, dword [esp + 0x7c]
ja 0x51020c
cmp dword [esp + 0x48], 0
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x14]
je 0x510044
mov edx, dword [esp + 0x28]
lea esi, [ebp*8]
xor ebp, ebp
mov dword [esp + 0x34], 0
mov dword [esp + 0x68], 0
lea edi, [esi + edx]
mov dword [esp + 0x84], edi
test esi, 0xfffffff8
jle 0x5102bf
mov ecx, dword [esp + 0x14]
mov eax, 0xfffffffa
add edx, 6
sub eax, dword [ecx]
mov dword [esp + 0x80], eax
movzx ecx, word [edx - 2]
add eax, edx
movzx edi, word [edx]
mov dword [esp + 0x88], ecx
mov ecx, dword [esp + 0x14]
sar eax, 3
lea ebx, [edi + 3]
cmp dword [ecx + 0x28], eax
movzx ecx, word [edx - 2]
jne 0x51029d
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x24]
cmp eax, 1
jne 0x510292
lea eax, [ecx + 0x10000]
mov dword [esp + 0x88], eax
jmp 0x51029d
cmp eax, 2
jne 0x51029d
lea ebx, [edi + 0x10003]
mov eax, dword [esp + 0x80]
sub esi, 8
add ebp, ebx
add edx, 8
test esi, 0xfffffff8
jg 0x510254
mov edi, dword [esp + 0x84]
mov edx, dword [esp + 0x28]
cmp dword [esp + 0xc4], 0
mov ecx, dword [esp + 0x64]
lea esi, [ecx + ebp]
je 0x5102de
cmp dword [esp + 0x48], 0
je 0x5102de
mov eax, 1
jmp 0x5102e0
xor eax, eax
push eax
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x3c]
mov ebp, dword [esp + 0x58]
push eax
push dword [esp + 0x38]
mov eax, dword [esp + 0x7c]
push dword [esp + 0x30]
sub eax, ebx
push dword [esp + 0xd4]
push eax
push ebx
push dword [esp + 0x80]
mov ebx, dword [esp + 0x5c]
push dword [esp + 0x68]
push dword [esp + 0x68]
push dword [esp + 0x68]
push ecx
push ebx
push ebp
push edx
push dword [esp + 0x50]
push dword [esp + 0x74]
call fcn.0050fb60
add esp, 0x48
cmp eax, 0xffffff88
ja 0x510574
mov ecx, dword [esp + 0x64]
mov ebx, ecx
test eax, eax
je 0x510394
cmp eax, esi
jae 0x510394
add dword [esp + 0x38], ecx
xor ebx, ebx
add dword [esp + 0x18], eax
xor ecx, ecx
add dword [esp + 0x3c], ebp
add dword [esp + 0x40], ebp
add dword [esp + 0x44], ebp
xor ebp, ebp
add dword [esp + 0x54], esi
cmp dword [esp + 0x34], ecx
mov eax, dword [esp + 0x20]
cmovne eax, ecx
mov dword [esp + 0x28], edi
mov ecx, dword [esp + 0x2c]
xor edx, edx
cmp dword [esp + 0x68], edx
mov dword [esp + 0x50], ebp
cmovne ecx, edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], ecx
jmp 0x510398
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x48], 0
mov edx, dword [esp + 0x24]
je 0x510040
test eax, eax
je 0x5103ba
mov esi, dword [esp + 0x70]
mov ecx, 0x102
mov edi, dword [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x2c], 0
je 0x5103fc
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x88]
cmp eax, 2
je 0x5103f5
cmp eax, 1
je 0x5103f5
mov eax, dword [ecx + 0x90]
cmp eax, 2
je 0x5103f5
cmp eax, 1
je 0x5103f5
mov eax, dword [ecx + 0x8c]
cmp eax, 2
je 0x5103f5
cmp eax, 1
jne 0x5103fc
xor eax, eax
jmp 0x510574
mov ecx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x54]
mov ebx, dword [esp + 0x18]
cmp ebp, ecx
jae 0x51056e
mov eax, dword [esp + 0xc4]
sub ecx, ebp
mov edx, dword [esp + 0x6c]
sub edx, ebx
lea esi, [ecx + 3]
lea eax, [eax + ecx*8]
cmp esi, edx
jbe 0x510435
mov esi, 0xffffffba
mov eax, esi
jmp 0x510574
mov word [ebx], ax
shr eax, 0x10
push ecx
mov byte [ebx + 2], al
lea eax, [ebx + 3]
push ebp
push eax
call fcn.004930c0
add esp, 0xc
cmp esi, 0xffffff88
jbe 0x510458
mov eax, esi
jmp 0x510574
mov eax, dword [esp + 0x28]
add ebx, esi
mov dword [esp + 0x18], ebx
cmp eax, dword [esp + 0x58]
jae 0x51056e
mov ecx, dword [esp + 0x70]
mov ebx, dword [esp + 0x24]
movq xmm0, qword [ecx + 0x11e8]
mov edx, dword [ecx + 0x11f0]
movq qword [esp + 0x88], xmm0
mov dword [esp + 0x90], edx
cmp ebx, eax
jae 0x510558
mov eax, dword [esp + 0x14]
mov edi, ebx
mov esi, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
mov eax, dword [eax]
sub edi, eax
add eax, 4
mov dword [esp + 0x5c], eax
nop dword [eax]
movzx ebp, word [eax + edi]
mov eax, edi
mov ebx, dword [esp + 0x14]
sar eax, 3
cmp dword [ebx + 0x28], eax
mov ebx, dword [esp + 0x24]
jne 0x5104e6
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x24], 1
jne 0x5104e6
add ebp, 0x10000
mov ebx, dword [ebx]
cmp ebx, 3
jbe 0x5104f6
mov edx, esi
mov esi, ecx
lea ecx, [ebx - 3]
jmp 0x51051e
xor eax, eax
test ebp, ebp
sete al
dec eax
add eax, ebx
je 0x510533
cmp eax, 3
jne 0x51050c
lea ebx, [ecx - 1]
jmp 0x510518
mov ebx, dword [esp + eax*4 + 0x88]
cmp eax, 2
jb 0x51051a
mov edx, esi
mov esi, ecx
mov ecx, ebx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], edx
mov ebx, dword [esp + 0x24]
add edi, 8
mov eax, dword [esp + 0x5c]
add ebx, 8
mov dword [esp + 0x24], ebx
cmp ebx, dword [esp + 0x28]
jb 0x5104c0
movq xmm0, qword [esp + 0x88]
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
movq qword [eax + 0x11e8], xmm0
mov dword [eax + 0x11f0], edx
sub ebx, dword [esp + 0x74]
mov eax, ebx
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004913e0
add esp, 0x88
ret