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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
mov edx, ecx
push esi
mov esi, dword [edx + 0x1c]
push edi
mov dword [esp + 0xc], edx
test esi, esi
je 0x51840a
cmp byte [esi + 0x69], 0
je 0x51840a
mov ecx, dword [esi + 0x34]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
test ecx, ecx
je 0x518406
push 1
lea eax, [esp + 0x34]
push eax
call fcn.00516ce0
mov edx, dword [esp + 0xc]
mov byte [esi + 0x69], 0
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
je 0x518417
mov ecx, dword [eax]
jmp 0x518419
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x14], ecx
nop
test ecx, ecx
je 0x5186c7
test eax, eax
jne 0x518434
mov eax, ecx
mov dword [esp + 0x10], eax
jmp 0x518443
mov eax, dword [eax + 0x14]
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x5186c7
movq xmm0, qword [eax]
movq qword [esp + 0x30], xmm0
movq xmm0, qword [eax + 8]
mov esi, dword [esp + 0x34]
mov eax, dword [edx + 0x78]
mov ebx, dword [esp + 0x30]
add esi, dword [edx + 0x7c]
movq qword [esp + 0x38], xmm0
mov edi, dword [esp + 0x3c]
add edi, dword [edx + 0x7c]
add dword [esp + 0x38], eax
add ebx, eax
cmp dword [0x772da8], 0
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], edi
je 0x5186a5
cmp dword [edx + 0x60], 0xffffffff
jne 0x5184a1
mov ecx, edx
call fcn.0050c3d0
mov edx, dword [esp + 0xc]
cmp dword [edx + 0x60], 0
jne 0x5184ba
cmp byte [edx + 0x210], 0
jne 0x5184ba
mov ecx, dword [esp + 0x38]
mov ebx, edi
sub ebx, esi
jmp 0x5184f9
mov ecx, dword [esp + 0x38]
mov eax, ecx
sub eax, ebx
cmp eax, 0x28
jge 0x5184ce
mov ebx, 0x80
jmp 0x5184f9
cmp eax, 0x50
jge 0x5184da
mov ebx, 0x40
jmp 0x5184f9
cmp eax, 0xa0
jge 0x5184e8
mov ebx, 0x20
jmp 0x5184f9
xor ebx, ebx
cmp eax, 0x140
setl bl
lea ebx, [ebx*8 + 8]
cmp dword [0x772da8], 2
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], ecx
jne 0x5185b2
mov eax, esi
mov dword [esp + 0x18], esi
cmp esi, edi
jge 0x51855a
mov esi, dword [esp + 0xc]
lea ecx, [eax + ebx]
mov dword [esp + 0x24], eax
cmp ecx, edi
mov eax, edi
cmovl eax, ecx
mov dword [esp + 0x2c], eax
push 0
lea eax, [esp + 0x24]
push eax
push dword [ebp + 0xc]
mov ecx, esi
call fcn.00517520
mov eax, dword [esp + 0x18]
lea eax, [eax + ebx*2]
mov dword [esp + 0x18], eax
cmp eax, edi
jl 0x518520
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
add esi, ebx
cmp esi, edi
jge 0x518420
lea eax, [ebx + ebx]
mov dword [esp + 0x1c], eax
add ebx, esi
mov eax, edi
cmp ebx, edi
cmovl eax, ebx
mov dword [esp + 0x2c], eax
push 0
lea eax, [esp + 0x24]
push eax
push dword [ebp + 0xc]
mov ecx, edx
mov dword [esp + 0x30], esi
call fcn.00517520
add esi, dword [esp + 0x1c]
add ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0xc]
cmp esi, edi
jl 0x518575
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
jmp 0x518420
cmp dword [0x772da8], 1
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
jne 0x518607
cmp esi, edi
jge 0x518420
jmp 0x5185d0
mov dword [esp + 0x24], esi
add esi, ebx
mov eax, edi
cmp esi, edi
cmovl eax, esi
mov dword [esp + 0x2c], eax
push 0
lea eax, [esp + 0x24]
push eax
push dword [ebp + 0xc]
mov ecx, edx
call fcn.00517520
mov edx, dword [esp + 0xc]
cmp esi, edi
jl 0x5185d0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
jmp 0x518420
cmp dword [0x772da8], 3
jne 0x518420
test byte [0x796e5c], 1
je 0x51865e
cmp esi, edi
jge 0x51864b
mov dword [esp + 0x24], esi
add esi, ebx
mov eax, edi
cmp esi, edi
cmovl eax, esi
mov dword [esp + 0x2c], eax
push 0
lea eax, [esp + 0x24]
push eax
push dword [ebp + 0xc]
mov ecx, edx
call fcn.00517520
mov edx, dword [esp + 0xc]
cmp esi, edi
jl 0x518621
inc dword [0x796e5c]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
jmp 0x518420
mov ecx, edi
sub ecx, ebx
cmp ecx, esi
cmovl ecx, esi
cmp ecx, esi
mov eax, ecx
cmovl eax, esi
mov dword [esp + 0x24], eax
lea eax, [ecx + ebx]
mov dword [esp + 0x18], ecx
cmp eax, edi
mov ecx, edi
cmovl ecx, eax
mov dword [esp + 0x2c], ecx
cmp ecx, esi
jle 0x51864b
push 0
lea eax, [esp + 0x24]
push eax
push dword [ebp + 0xc]
mov ecx, edx
call fcn.00517520
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
sub ecx, ebx
jmp 0x518667
push 0
lea eax, [esp + 0x34]
push eax
push dword [ebp + 0xc]
mov ecx, edx
call fcn.00517520
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
jmp 0x518420
mov ecx, dword [ebp + 8]
call fcn.004edf80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8