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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xe0
mov esi, ecx
movups xmm0, xmmword [ebp + 0x10]
movups xmm1, xmmword [ebp + 0x20]
movaps xmmword [esp + 0xc0], xmm1
movaps xmmword [esp + 0xb0], xmm0
cmp byte [ebp + 0x38], 0
je 0x50866b
mov edi, edx
mov eax, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x30]
mov edx, dword [ebp + 8]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], eax
sub esp, 0xc
movsd xmm0, qword [esp + 0x8c]
movsd qword [esp + 4], xmm0
mov dword [esp], edx
lea ecx, [esp + 0x10]
call fcn.005093d0
movzx ebx, byte [esp + 0xc]
test bl, 1
jne 0x50867a
mov dword [esp], edi
mov edi, dword [esp + 4]
mov ecx, dword [esp + 8]
mov eax, dword [0x5657e4]
cmp byte [eax], 0
je 0x50886c
mov dword [esp + 0x70], ecx
mov dword [esp + 0x6c], edi
sub esp, 0xc
movsd xmm0, qword [esp + 0x78]
movsd qword [esp + 4], xmm0
lea eax, [esp + 0x3c]
mov dword [esp], eax
call fcn.00550ab6
add esp, 0xc
mov eax, dword [esp + 0x38]
mov dword [esp + 0x20], eax
movsd xmm0, qword [esp + 0x30]
movsd qword [esp + 0x18], xmm0
mov edi, dword [esp]
test byte [esp + 0xc], 1
jne 0x5086b4
jmp 0x5086c9
mov byte [esi], 6
mov dword [esi + 1], 0x3e3f3c
jmp 0x508c7d
mov eax, dword [esp + 4]
mov dword [esp + 4], 0
mov dword [esp + 0x68], eax
lea eax, [esp + 0x68]
mov ecx, edi
push eax
call fcn.0053aa50
mov ecx, dword [esp + 0x68]
test ecx, ecx
je 0x5086a3
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esi], 6
mov dword [esi + 1], 0x3e3f3c
test byte [esp + 0xc], 1
je 0x5086c9
mov ecx, dword [esp + 4]
mov dword [esp + 4], 0
test ecx, ecx
je 0x5086c9
mov eax, dword [ecx]
call dword [eax + 4]
movzx edx, byte [esp + 0x18]
test bl, 1
jne 0x508c6c
test dl, 1
je 0x5086ea
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x5087c9
jmp 0x5086f7
movzx ecx, dl
shr ecx, 1
test ecx, ecx
jne 0x5087c9
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 4]
and al, 0xf
cmp al, 3
jne 0x5087c9
mov ebx, edx
mov eax, dword [ebp + 0xc]
sub esp, 0x24
movaps xmm0, xmmword [esp + 0xd4]
movaps xmm1, xmmword [esp + 0xe4]
movups xmmword [esp + 0x14], xmm1
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
lea ecx, [esp + 0x4c]
mov edx, dword [ebp + 8]
call fcn.00509510
add esp, 0x24
test byte [esp + 0x2c], 1
jne 0x508a2a
lea ecx, [esp + 4]
push dword [esp + 0x28]
push dword [edi + 0x3c]
call fcn.00506ca0
test byte [esp + 8], 1
jne 0x508b6d
mov eax, dword [edi + 0x3c]
mov ecx, dword [esp + 4]
mov dword [esp + 0x6c], 0x43ad10
mov dword [esp + 0x30], 0x43b380
lea edx, [esp + 0x6c]
mov dword [esp + 0x34], edx
sub esp, 0x10
movsd xmm0, qword [esp + 0x40]
movsd qword [esp + 8], xmm0
mov dword [esp + 4], ecx
mov dword [esp], eax
lea ecx, [esp + 0x60]
call fcn.00506570
test byte [esp + 8], 1
je 0x508b7a
mov ecx, dword [esp + 4]
mov dword [esp + 4], 0
test ecx, ecx
je 0x508b7a
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x508b7a
cmp byte [ebp + 0x3c], 0
je 0x508856
mov dword [esp + 0x24], ecx
mov ebx, dword [edi + 0x264]
test ebx, ebx
je 0x50889f
mov dword [esp + 0x4c], edx
mov eax, dword [ebp + 8]
sub eax, dword [edi + 0x148]
mov ecx, 0xaaaaaaab
mul ecx
shr edx, 4
lea ecx, [esp + 0x30]
push edx
push ebx
push dword [edi + 0x3c]
call fcn.00509a90
test byte [esp + 0x34], 1
mov eax, dword [esp + 0x30]
jne 0x5088db
mov dword [esp], edi
movzx edi, word [eax]
rol di, 8
cmp di, 1
mov ebx, dword [esp + 0x24]
ja 0x508a62
and byte [esp + 0xc], 0xfe
mov byte [esp + 0x88], 0
mov dword [esp + 4], 0x55855d
mov dword [esp + 8], 0
mov edi, dword [esp]
jmp 0x5088e8
mov eax, dword [esp + 0x20]
mov dword [esi + 8], eax
movsd xmm0, qword [esp + 0x18]
movsd qword [esi], xmm0
jmp 0x508c7d
test edi, edi
je 0x5088be
cmp ecx, 0xfffffff0
jae 0x508cbe
cmp ecx, 0xb
mov dword [esp + 0x24], ecx
jae 0x5089cb
mov eax, ecx
add al, cl
mov byte [esp + 0x30], al
lea eax, [esp + 0x31]
test ecx, ecx
jne 0x5089f7
jmp 0x508a0a
and byte [esp + 0xc], 0xfe
mov byte [esp + 0x88], 0
mov dword [esp + 4], 0x55855d
mov dword [esp + 8], 0
jmp 0x5088ef
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0
jmp 0x50864b
or byte [esp + 0xc], 1
mov dword [esp + 4], eax
mov ebx, dword [esp + 0x24]
test byte [esp + 0xc], 1
jne 0x508961
cmp dword [esp + 8], 0
je 0x508926
cmp byte [esp + 0x88], 0
mov eax, 0x55c95c
mov edx, 0x55c959
cmove edx, eax
lea edi, [esp + 0x18]
mov ecx, edi
push edx
call fcn.00550f36
mov ecx, edi
push dword [esp + 8]
push dword [esp + 8]
call fcn.00550f3c
mov eax, dword [esp + 0x20]
mov dword [esi + 8], eax
movsd xmm0, qword [esp + 0x18]
movsd qword [esi], xmm0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
xor edx, edx
test byte [esp + 0xc], 1
jne 0x508b4a
jmp 0x508c6c
mov eax, dword [esp + 4]
mov dword [esp + 4], 0
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x5c]
mov ecx, edi
push eax
call fcn.0053aa50
mov ecx, dword [esp + 0x5c]
test ecx, ecx
je 0x50898a
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebx + 0xa]
cmp eax, 0xfffffff0
jae 0x508cc7
cmp eax, 0xb
jae 0x508ad6
add al, al
lea edi, [esi + 1]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov byte [esi], al
test ebx, ebx
mov edx, dword [esp + 0x4c]
jne 0x508b06
jmp 0x508b24
mov dword [esp + 0x48], esi
mov esi, ecx
or esi, 0xf
lea eax, [esi + 1]
push eax
call sub.libc.dll_operator_new_unsigned_int_
mov ecx, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x38], eax
add esi, 2
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x48]
mov dword [esp + 0x34], ecx
push ecx
push edi
push eax
mov edi, eax
call sub.msvcrt.dll_memcpy
mov eax, edi
mov ecx, dword [esp + 0x30]
add esp, 0xc
mov byte [eax + ecx], 0
test byte [esp + 0x18], 1
je 0x50864b
push dword [esp + 0x20]
call sub.libc.dll_operator_delete_void_
add esp, 4
jmp 0x50864b
mov eax, dword [esp + 0x28]
mov dword [esp + 0x28], 0
mov dword [esp + 0x64], eax
lea eax, [esp + 0x64]
mov ecx, edi
push eax
call fcn.0053aa50
mov ecx, dword [esp + 0x64]
test ecx, ecx
je 0x508a53
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esi], 6
mov dword [esi + 1], 0x3e3f3c
jmp 0x508c4c
lea ecx, [esp + 0x6c]
mov edx, dword [esp]
call fcn.00509be0
test byte [esp + 0x70], 1
jne 0x508c85
movzx eax, di
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x3c]
mov edx, dword [esp + 0x6c]
mov edi, dword [ebp + 8]
cmp word [edi + 6], 0
sete byte [esp + 0x9c]
mov byte [esp + 0x9d], 1
sub esp, 0x14
mov edi, esi
movzx esi, word [esp + 0xb0]
mov word [esp + 0x10], si
mov esi, edi
mov dword [esp + 0xc], edx
lea edx, [esp + 0x9c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
lea ecx, [esp + 0x18]
call fcn.00509cd0
jmp 0x508c92
mov dword [esp + 0x48], esi
mov esi, eax
or esi, 0xf
mov dword [esp], eax
lea eax, [esi + 1]
push eax
call sub.libc.dll_operator_new_unsigned_int_
add esp, 4
mov edi, eax
add esi, 2
mov eax, dword [esp + 0x48]
mov dword [eax], esi
mov dword [eax + 8], edi
mov ecx, dword [esp]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x4c]
test dl, 1
je 0x508b11
mov eax, dword [esp + 0x20]
jmp 0x508b15
lea eax, [esp + 0x19]
push ebx
push eax
push edi
call sub.msvcrt.dll_memmove
add esp, 0xc
mov edx, dword [esp + 0x4c]
mov word [edi + ebx + 8], 0x3e74
mov dword [edi + ebx + 4], 0x70757272
mov dword [edi + ebx], 0x6f633c40
mov byte [edi + ebx + 0xa], 0
test byte [esp + 0xc], 1
je 0x508c6c
mov ecx, dword [esp + 4]
mov dword [esp + 4], 0
test ecx, ecx
je 0x508c6c
mov eax, dword [ecx]
call dword [eax + 4]
movzx edx, byte [esp + 0x18]
jmp 0x508c6c
mov eax, dword [esp + 4]
or byte [esp + 0x58], 1
mov dword [esp + 0x50], eax
test byte [esp + 0x58], 1
jne 0x508b92
lea eax, [esp + 0x50]
mov ecx, esi
push eax
call fcn.0043dbb0
jmp 0x508c2e
mov ecx, edi
mov edi, esi
mov eax, dword [esp + 0x50]
mov dword [esp + 0x50], 0
mov dword [esp + 0x60], eax
lea eax, [esp + 0x60]
push eax
call fcn.0053aa50
mov ecx, dword [esp + 0x60]
test ecx, ecx
je 0x508bbd
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [esp + 0x6c], str._section
mov word [esp + 0x7c], 0x103
mov eax, dword [esp + 0x28]
mov word [esp + 0xac], 0x108
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x9c]
lea ecx, [esp + 0x6c]
lea esi, [esp + 0x30]
push eax
push ecx
push esi
call fcn.0043a750
add esp, 0xc
mov dword [esp + 0x88], 0x55c957
mov word [esp + 0x98], 0x103
lea eax, [esp + 0x88]
push eax
push esi
lea esi, [esp + 0xc]
push esi
call fcn.0043a750
add esp, 0xc
mov ecx, edi
push esi
call fcn.00550b46
test byte [esp + 0x58], 1
mov edx, ebx
je 0x508c4e
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x50], 0
test ecx, ecx
je 0x508c4e
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, ebx
test byte [esp + 0x2c], 1
je 0x508c6c
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x28], 0
test ecx, ecx
je 0x508c6c
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, ebx
test dl, 1
je 0x508c7d
push dword [esp + 0x20]
call sub.libc.dll_operator_delete_void_
add esp, 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 0x6c]
or byte [esp + 0xc], 1
mov dword [esp + 4], eax
test byte [esp + 0x34], 1
mov edi, dword [esp]
je 0x5088e8
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x30], 0
test ecx, ecx
je 0x5088e8
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x5088e8
lea ecx, [esp + 0x30]
call fcn.00407790
mov ecx, esi
call fcn.00407790
int3