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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [ecx + 0x5c]
mov dword [esp + 4], edx
xor edx, edx
mov dword [esp + 0x24], eax
mov eax, dword [ecx + 0xcc]
test eax, eax
push ebx
mov ebx, dword [ecx + 0xc]
sete dl
add edx, eax
mov dword [esp + 0x14], ebx
mov eax, dword [ecx + 4]
mov dword [esp + 0x10], eax
add eax, ebx
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x6c], edx
push esi
mov esi, dword [ebp + 0xc]
add edx, esi
add eax, esi
mov dword [esp + 0x30], edx
mov edx, dword [ebp + 8]
mov dword [esp + 8], eax
add eax, 0xfffffff8
mov dword [esp + 0x20], eax
push edi
mov eax, dword [edx]
mov edi, dword [ecx + 0xc0]
mov ecx, dword [ecx + 0xb4]
mov dword [esp + 0x14], eax
mov eax, dword [edx + 4]
mov dword [esp + 0x28], eax
mov eax, dword [ecx + 0x5c]
mov edx, dword [ecx + 0xc]
mov dword [esp + 0x7c], edx
mov dword [esp + 0x60], eax
mov eax, dword [ecx + 4]
add edx, eax
mov dword [esp + 0x4c], edx
mov edx, dword [ecx]
mov dword [esp + 0x40], edx
mov dword [esp + 0x3c], eax
sub eax, edx
sub edx, dword [esp + 0x4c]
add eax, ebx
sub edx, dword [esp + 0x20]
mov ebx, 0
add edx, esi
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x34]
sete bl
add ebx, esi
cmp edx, dword [esp + 0x24]
ja 0x509dc7
mov eax, 0x40
sub eax, edi
mov dword [esp + 0x2c], eax
mov eax, 0x38
sub eax, dword [ecx + 0xc0]
mov dword [esp + 0x58], eax
nop dword [eax + eax]
push 0xcf1bbcdc
push 0xbb000000
push dword [ebx + 4]
push dword [ebx]
call fcn.00546f20
mov ecx, dword [esp + 0x2c]
mov esi, eax
mov edi, edx
call fcn.00519d00
mov ecx, dword [esp + 0x58]
mov edx, edi
mov dword [esp + 0x48], eax
mov eax, esi
call fcn.00519d00
mov edx, dword [esp + 0x60]
mov ecx, eax
mov esi, dword [esp + 0x18]
mov edi, ebx
shr eax, 8
mov edx, dword [edx + eax*4]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], edx
xor edx, ecx
xor ecx, ecx
test dl, dl
mov edx, dword [esp + 0x48]
sete cl
sub edi, esi
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0x34]
mov edx, dword [eax + edx*4]
mov eax, dword [esp + 0x74]
mov dword [esp + 0x68], eax
lea eax, [ebx + 0x100]
mov dword [esp + 0x44], edx
mov dword [esp + 0x70], eax
mov eax, edi
sub eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x50], edi
mov dword [esp + 0x84], ecx
mov dword [esp + 0x78], eax
cmp eax, dword [esp + 0x1c]
jae 0x5096d2
sub eax, dword [esp + 0x54]
add eax, dword [esp + 0x3c]
jmp 0x5096d4
add eax, esi
push 0xcf1bbcdc
push 0xbb000000
push dword [ecx + 4]
mov dword [esp + 0x68], eax
push dword [ecx]
call fcn.00546f20
mov ecx, dword [esp + 0x2c]
mov esi, eax
mov edi, edx
call fcn.00519d00
mov ecx, dword [esp + 0x58]
mov edx, edi
mov dword [esp + 0x6c], eax
mov eax, esi
call fcn.00519d00
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x50]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x48]
mov dword [ecx + eax*4], edi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x78]
sub eax, ecx
dec eax
cmp eax, 3
jb 0x50973f
mov esi, dword [esp + 0x5c]
mov eax, dword [esi]
cmp eax, dword [ebx + 1]
je 0x509952
cmp dword [esp + 0x64], 0
je 0x5098b4
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
shr ecx, 8
add edx, ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x78], edx
cmp ecx, dword [esp + 0x7c]
jbe 0x5098b4
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x5098b4
mov esi, dword [esp + 0x44]
cmp esi, dword [esp + 0x1c]
ja 0x5098be
sub edi, ecx
lea esi, [edx + 4]
sub edi, dword [esp + 0x54]
lea eax, [ebx + 4]
mov ecx, dword [esp + 0xc]
sub eax, esi
add eax, dword [esp + 0x40]
mov edx, esi
cmp eax, ecx
mov dword [esp + 0x6c], edi
cmovb ecx, eax
push ecx
lea ecx, [ebx + 4]
call fcn.00505190
mov edi, eax
add esp, 4
lea eax, [edi + esi]
cmp eax, dword [esp + 0x40]
jne 0x5097d0
push dword [esp + 0xc]
mov edx, dword [esp + 0x24]
lea ecx, [edi + 4]
add ecx, ebx
call fcn.00505190
add esp, 4
add edi, eax
mov eax, dword [esp + 0x4c]
add edi, 4
cmp eax, dword [esp + 0x78]
sbb ecx, ecx
neg ecx
cmp dword [ebp + 0xc], ebx
sbb eax, eax
neg eax
test eax, ecx
je 0x509813
mov edx, dword [esp + 0x38]
add edx, dword [esp + 0x3c]
mov al, byte [ebx - 1]
lea ecx, [edx - 1]
mov edx, ecx
cmp al, byte [ecx]
jne 0x509813
dec ebx
inc edi
cmp dword [esp + 0x4c], edx
sbb ecx, ecx
neg ecx
cmp dword [ebp + 0xc], ebx
sbb eax, eax
neg eax
test eax, ecx
jne 0x5097f2
mov ecx, dword [ebp + 0xc]
mov edx, ebx
mov eax, dword [esp + 0x14]
sub edx, ecx
mov esi, dword [esp + 0x10]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x14], eax
lea eax, [edx + ecx]
mov dword [esp + 0x70], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esp + 0xc]
add esi, 0xffffffe0
mov dword [esp + 0x38], edx
cmp dword [esp + 0x70], esi
mov esi, dword [esp + 0x10]
ja 0x509b7a
movups xmm0, xmmword [ecx]
movups xmmword [eax], xmm0
cmp edx, 0x10
jbe 0x509b96
movups xmm0, xmmword [ecx + 0x10]
lea eax, [edx - 0x10]
lea edx, [ecx + 0x10]
mov ecx, dword [esi + 0xc]
add ecx, 0x10
lea esi, [ecx + eax]
mov dword [esp + 0x84], esi
mov esi, dword [esp + 0x10]
movups xmmword [ecx], xmm0
cmp eax, 0x10
jle 0x509b92
mov eax, dword [esp + 0x84]
add ecx, 0x10
add edx, 0x10
movups xmm0, xmmword [edx]
lea edx, [edx + 0x20]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [edx - 0x10]
movups xmmword [ecx + 0x10], xmm0
add ecx, 0x20
cmp ecx, eax
jb 0x509897
jmp 0x509b92
mov esi, dword [esp + 0x44]
cmp esi, dword [esp + 0x1c]
jbe 0x5098ce
mov ecx, dword [esp + 0x18]
add ecx, esi
mov eax, dword [ecx]
cmp eax, dword [ebx]
je 0x509a87
mov ecx, dword [esp + 0x80]
mov eax, ecx
mov edx, dword [esp + 0x60]
mov ebx, dword [esp + 0x68]
mov esi, dword [esp + 0x70]
shr eax, 8
lea edi, [ebx + 1]
mov edx, dword [edx + eax*4]
xor ecx, edx
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], edx
xor edx, edx
test cl, cl
mov ecx, dword [esp + 0x34]
sete dl
cmp ecx, esi
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x6c]
cmovb edi, ebx
mov ebx, ecx
mov dword [esp + 0x68], edi
add ecx, edi
mov dword [esp + 0x34], ecx
mov edx, dword [eax + edx*4]
mov dword [esp + 0x44], edx
cmp ecx, dword [esp + 0x24]
ja 0x509dc4
mov eax, dword [esp + 0x6c]
mov edi, ebx
sub edi, dword [esp + 0x18]
cmp dword [esp + 0x84], esi
mov dword [esp + 0x48], eax
lea eax, [esi + 0x100]
cmovb eax, esi
mov esi, dword [esp + 0x18]
jmp 0x5096a8
cmp ecx, dword [esp + 0x1c]
lea eax, [ebx + 5]
mov edx, dword [esp + 0xc]
mov edi, edx
cmovb edi, dword [esp + 0x40]
mov ecx, edx
add esi, 4
sub eax, esi
add eax, edi
cmp eax, edx
mov edx, esi
cmovb ecx, eax
push ecx
lea ecx, [ebx + 5]
call fcn.00505190
mov ecx, eax
add esp, 4
mov dword [esp + 0x84], ecx
lea eax, [ecx + esi]
cmp eax, edi
jne 0x5099ae
push dword [esp + 0xc]
mov edx, dword [esp + 0x24]
lea eax, [ebx + 5]
add ecx, eax
call fcn.00505190
mov ecx, dword [esp + 0x88]
add esp, 4
add ecx, eax
mov esi, dword [esp + 0x10]
lea edi, [ecx + 4]
mov ecx, dword [ebp + 0xc]
inc ebx
mov edx, ebx
sub edx, ecx
mov dword [esp + 0x34], edx
lea eax, [edx + ecx]
mov dword [esp + 0x70], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esp + 0xc]
add esi, 0xffffffe0
cmp dword [esp + 0x70], esi
mov esi, dword [esp + 0x10]
ja 0x509a3a
movups xmm0, xmmword [ecx]
movups xmmword [eax], xmm0
cmp edx, 0x10
jbe 0x509a56
movups xmm0, xmmword [ecx + 0x10]
lea eax, [edx - 0x10]
lea edx, [ecx + 0x10]
mov ecx, dword [esi + 0xc]
add ecx, 0x10
lea esi, [ecx + eax]
mov dword [esp + 0x84], esi
mov esi, dword [esp + 0x10]
movups xmmword [ecx], xmm0
cmp eax, 0x10
jle 0x509a52
mov eax, dword [esp + 0x84]
add ecx, 0x10
add edx, 0x10
nop word [eax + eax]
movups xmm0, xmmword [edx]
lea edx, [edx + 0x20]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [edx - 0x10]
movups xmmword [ecx + 0x10], xmm0
add ecx, 0x20
cmp ecx, eax
jb 0x509a20
jmp 0x509a52
mov edx, dword [esp + 0xc]
add edx, 0xffffffe0
push edx
push dword [esp + 0x74]
mov edx, ecx
mov ecx, eax
call fcn.00505120
add esp, 8
mov edx, dword [esp + 0x34]
add dword [esi + 0xc], edx
mov ecx, dword [esi + 4]
cmp edx, 0xffff
jbe 0x509a75
mov eax, ecx
mov dword [esi + 0x24], 1
sub eax, dword [esi]
sar eax, 3
mov dword [esi + 0x28], eax
mov word [ecx + 4], dx
mov eax, dword [esi + 4]
mov dword [eax], 1
jmp 0x509bc5
push dword [esp + 0xc]
mov eax, ebx
lea edx, [ecx + 4]
sub eax, ecx
lea ecx, [ebx + 4]
mov dword [esp + 0x70], eax
call fcn.00505190
mov edx, dword [esp + 0x1c]
add esp, 4
lea edi, [eax + 4]
lea eax, [esi + edx]
cmp dword [esp + 0x20], eax
sbb ecx, ecx
neg ecx
cmp dword [ebp + 0xc], ebx
sbb eax, eax
neg eax
test eax, ecx
je 0x509ae1
add edx, esi
mov al, byte [ebx - 1]
lea ecx, [edx - 1]
mov edx, ecx
cmp al, byte [ecx]
jne 0x509ae1
dec ebx
inc edi
cmp dword [esp + 0x20], edx
sbb ecx, ecx
neg ecx
cmp dword [ebp + 0xc], ebx
sbb eax, eax
neg eax
test eax, ecx
jne 0x509ac0
mov ecx, dword [ebp + 0xc]
mov edx, ebx
mov eax, dword [esp + 0x14]
sub edx, ecx
mov esi, dword [esp + 0x10]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x14], eax
lea eax, [edx + ecx]
mov dword [esp + 0x70], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esp + 0xc]
add esi, 0xffffffe0
mov dword [esp + 0x38], edx
cmp dword [esp + 0x70], esi
mov esi, dword [esp + 0x10]
ja 0x509b7a
movups xmm0, xmmword [ecx]
movups xmmword [eax], xmm0
cmp edx, 0x10
jbe 0x509b96
movups xmm0, xmmword [ecx + 0x10]
lea eax, [edx - 0x10]
lea edx, [ecx + 0x10]
mov ecx, dword [esi + 0xc]
add ecx, 0x10
lea esi, [ecx + eax]
mov dword [esp + 0x84], esi
mov esi, dword [esp + 0x10]
movups xmmword [ecx], xmm0
cmp eax, 0x10
jle 0x509b92
mov eax, dword [esp + 0x84]
add ecx, 0x10
add edx, 0x10
nop dword [eax]
movups xmm0, xmmword [edx]
lea edx, [edx + 0x20]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [edx - 0x10]
movups xmmword [ecx + 0x10], xmm0
add ecx, 0x20
cmp ecx, eax
jb 0x509b60
jmp 0x509b92
mov edx, dword [esp + 0xc]
add edx, 0xffffffe0
push edx
push dword [esp + 0x74]
mov edx, ecx
mov ecx, eax
call fcn.00505120
add esp, 8
mov edx, dword [esp + 0x38]
add dword [esi + 0xc], edx
mov ecx, dword [esi + 4]
cmp edx, 0xffff
jbe 0x509bb5
mov eax, ecx
mov dword [esi + 0x24], 1
sub eax, dword [esi]
sar eax, 3
mov dword [esi + 0x28], eax
mov word [ecx + 4], dx
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x6c]
add ecx, 3
mov dword [eax], ecx
mov ecx, dword [esi + 4]
lea edx, [edi - 3]
cmp edx, 0xffff
jbe 0x509be4
mov eax, ecx
mov dword [esi + 0x24], 2
sub eax, dword [esi]
sar eax, 3
mov dword [esi + 0x28], eax
mov eax, dword [esp + 0x24]
add ebx, edi
mov word [ecx + 6], dx
add dword [esi + 4], 8
mov dword [ebp + 0xc], ebx
cmp ebx, eax
ja 0x509db2
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x18]
push 0xcf1bbcdc
push 0xbb000000
push dword [esi + edi + 6]
push dword [esi + edi + 2]
call fcn.00546f20
mov ecx, dword [esp + 0x2c]
call fcn.00519d00
mov ecx, eax
lea eax, [esi + 2]
mov esi, dword [esp + 0x30]
push 0xcf1bbcdc
push 0xbb000000
mov dword [esi + ecx*4], eax
push dword [ebx + 2]
push dword [ebx - 2]
call fcn.00546f20
mov ecx, dword [esp + 0x2c]
call fcn.00519d00
mov ecx, eax
mov eax, ebx
sub eax, edi
sub eax, 2
mov dword [esi + ecx*4], eax
nop dword [eax + eax]
mov edx, dword [esp + 0x1c]
mov eax, ebx
sub eax, edi
mov ecx, eax
mov dword [esp + 0x80], eax
sub ecx, dword [esp + 0x28]
cmp ecx, edx
jae 0x509c85
mov esi, ecx
sub esi, dword [esp + 0x54]
add esi, dword [esp + 0x3c]
jmp 0x509c88
lea esi, [ecx + edi]
mov eax, edx
sub eax, ecx
dec eax
cmp eax, 3
jb 0x509dae
mov eax, dword [esi]
cmp eax, dword [ebx]
jne 0x509dae
mov edi, dword [esp + 0xc]
lea eax, [ebx + 4]
cmp ecx, edx
mov ecx, dword [esp + 0xc]
cmovb edi, dword [esp + 0x40]
add esi, 4
sub eax, esi
mov edx, esi
add eax, edi
cmp eax, ecx
cmovb ecx, eax
push ecx
lea ecx, [ebx + 4]
call fcn.00505190
mov ecx, eax
add esp, 4
mov dword [esp + 0x84], ecx
lea eax, [ecx + esi]
cmp eax, edi
jne 0x509cfa
push dword [esp + 0xc]
mov edx, dword [esp + 0x24]
lea eax, [ebx + 4]
add ecx, eax
call fcn.00505190
mov ecx, dword [esp + 0x88]
add esp, 4
add ecx, eax
mov eax, dword [esp + 0x28]
lea edi, [ecx + 4]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc]
add eax, 0xffffffe0
mov dword [esp + 0x28], ecx
mov ecx, dword [esi + 0xc]
cmp ebx, eax
ja 0x509d27
movups xmm0, xmmword [ebx]
movups xmmword [ecx], xmm0
jmp 0x509d33
push eax
push ebx
mov edx, ebx
call fcn.00505120
add esp, 8
mov eax, dword [esi + 4]
lea edx, [edi - 3]
xor ecx, ecx
mov word [eax + 4], cx
mov eax, dword [esi + 4]
mov dword [eax], 1
mov ecx, dword [esi + 4]
cmp edx, 0xffff
jbe 0x509d64
mov eax, ecx
mov dword [esi + 0x24], 2
sub eax, dword [esi]
sar eax, 3
mov dword [esi + 0x28], eax
push 0xcf1bbcdc
mov word [ecx + 6], dx
add dword [esi + 4], 8
push 0xbb000000
push dword [ebx + 4]
push dword [ebx]
call fcn.00546f20
mov ecx, dword [esp + 0x2c]
call fcn.00519d00
mov edx, dword [esp + 0x30]
add ebx, edi
mov ecx, dword [esp + 0x80]
mov edi, dword [esp + 0x18]
mov dword [ebp + 0xc], ebx
mov dword [edx + eax*4], ecx
mov eax, dword [esp + 0x24]
cmp ebx, eax
jbe 0x509c60
jmp 0x509db2
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x74]
add edx, ebx
mov dword [esp + 0x34], edx
cmp edx, eax
jbe 0x509630
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x14]
pop edi
mov dword [ecx], eax
mov eax, dword [esp + 0x24]
mov dword [ecx + 4], eax
mov eax, dword [esp + 8]
sub eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret