Function at 0x515aa0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
mov edi, dword [ebp + 0xc]
imul ecx, dword [ebx + 0x48], 0x5c
lea edx, [ebx + 0x8fbc]
mov eax, dword [ebx + 0x98bc]
add ecx, 0x609c70
xor esi, esi
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebx + ecx*4 + 0x9a18], eax
mov ecx, 0x240
nop dword [eax]
mov eax, dword [edx - 4]
lea edx, [edx - 4]
sar eax, 0xa
add esi, eax
sub ecx, 1
jne 0x515ae0
movsd xmm1, qword [0x609ab0]
test esi, esi
je 0x515b23
movd xmm0, esi
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_log_precise
divsd xmm0, qword [0x609ac0]
movsd xmm1, qword [0x609ab0]
cvttsd2si eax, xmm0
jmp 0x515b25
xor eax, eax
mov esi, dword [ebp + 0x10]
mov edx, 0x15
mov dword [ebx + esi*4 + 0x98c0], eax
lea eax, [esi*2 + 1]
add eax, edi
imul esi, esi, 0x54
imul ecx, eax, 0xa8
add esi, 0x991c
add ecx, dword [ebp + 8]
add esi, ebx
mov eax, dword [ebp - 4]
dec edx
sub ecx, 8
mov dword [ebp - 0xc], edx
add esi, 0xfffffffc
mov dword [ebp - 8], ecx
xor ebx, ebx
mov dword [ebp - 0x14], esi
mov ecx, dword [eax + edx*4 + 4]
xor edi, edi
mov esi, dword [eax + edx*4]
mov dword [ebp - 0x10], ebx
cmp esi, ecx
jge 0x515bf2
mov eax, ecx
sub eax, esi
cmp eax, 2
jl 0x515bba
mov edx, dword [ebp + 0x14]
sub ecx, esi
sub ecx, 2
add edx, 0x86c0
shr ecx, 1
inc ecx
lea edx, [edx + esi*4]
lea esi, [esi + ecx*2]
mov eax, dword [edx - 4]
lea edx, [edx + 8]
sar eax, 0xa
add edi, eax
mov eax, dword [edx - 8]
sar eax, 0xa
add ebx, eax
sub ecx, 1
jne 0x515b96
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
cmp esi, dword [ecx + eax*4 + 4]
jge 0x515bc9
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + esi*4 + 0x86bc]
sar ecx, 0xa
jmp 0x515bcc
mov ecx, dword [ebp - 0x10]
lea eax, [ebx + edi]
add ecx, eax
je 0x515bf2
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_log_precise
divsd xmm0, qword [0x609ac0]
cvttsd2si eax, xmm0
jmp 0x515bf4
xor eax, eax
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov dword [esi], eax
movsd xmm0, qword [ecx]
ucomisd xmm0, qword [0x55c110]
lahf
test ah, 0x44
jnp 0x515c24
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_log_precise
divsd xmm0, qword [0x609ac0]
mov ecx, dword [ebp - 8]
cvttsd2si eax, xmm0
jmp 0x515c26
xor eax, eax
mov edx, dword [ebp - 0xc]
mov dword [esi + 0xa8], eax
movsd xmm1, qword [0x609ab0]
test edx, edx
jne 0x515b51
cmp dword [ebp + 0x10], 1
jne 0x515d97
mov ebx, dword [ebp + 0x14]
mov eax, 2
xor esi, esi
lea edx, [ebx + 0x9a20]
nop dword [eax]
cmp dword [edx - 4], 0
lea edx, [edx - 4]
lea ecx, [esi + 1]
cmove ecx, esi
lea esi, [ecx + 1]
sub eax, 1
jne 0x515c60
mov eax, dword [ebx + 0x98c0]
sub eax, dword [ebx + 0x98c4]
cdq
xor eax, edx
sub eax, edx
cmp eax, 0xa
cmovge esi, ecx
xor edi, edi
mov dword [ebp + 0x10], esi
lea ecx, [ebx + 0x991c]
lea esi, [edi + 0x15]
nop word [eax + eax]
mov eax, dword [ecx - 4]
lea ecx, [ecx - 4]
sub eax, dword [ecx + 0x54]
cdq
xor eax, edx
sub eax, edx
add edi, eax
sub esi, 1
jne 0x515ca0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
shl edx, 4
cmp edi, 0x64
lea eax, [ecx + 1]
cmovge eax, ecx
cmp eax, 5
jne 0x515d6e
lea esi, [ebx + 0x7c]
mov ecx, 0x609a90
add esi, edx
mov edx, dword [0x609a90]
mov dword [ebp - 0xc], esi
xor ebx, ebx
lea eax, [ecx + 4]
mov dword [esi], ebx
mov ecx, eax
mov esi, dword [eax]
xor edi, edi
mov eax, edx
mov dword [ebp + 0x10], ecx
mov edx, esi
cmp eax, esi
jge 0x515d46
mov ecx, dword [ebp + 0x14]
lea ecx, [ecx + eax*4]
add ecx, 0x98c8
sub esi, eax
nop dword [eax]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
sub eax, dword [ecx + 0x50]
cdq
xor eax, edx
sub eax, edx
add ebx, eax
mov eax, dword [ecx + 0xa4]
sub eax, dword [ecx + 0xf8]
cdq
xor eax, edx
sub eax, edx
add edi, eax
sub esi, 1
jne 0x515d10
cmp ebx, 0xa
jge 0x515d65
cmp edi, 0xa
jge 0x515d65
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, 1
mov esi, dword [ebp - 0xc]
mov dword [esi], eax
add esi, 4
mov dword [ebp - 0xc], esi
cmp ecx, 0x609aa0
jl 0x515ce3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
xor eax, eax
mov edx, dword [ecx]
jmp 0x515d4b
mov dword [edx + ebx + 0x7c], 0
mov dword [edx + ebx + 0x80], 0
mov dword [edx + ebx + 0x84], 0
mov dword [edx + ebx + 0x88], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret