Function at 0x471040
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x591f78]
xorps xmm0, xmm0
push ebx
push esi
xor ebx, ebx
movsd qword [ebp - 0x18], xmm0
push edi
xor edi, edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], eax
test eax, eax
jne 0x471098
push 0x9c48
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 8], eax
mov dword [0x591f78], eax
test eax, eax
je 0x471098
push 0x9c48
push edi
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [0x591f78]
add esp, 0xc
mov dword [ebp - 8], eax
mov edx, dword [ebp + 8]
mov esi, edx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4710a0
sub esi, ecx
mov eax, esi
and eax, 3
je 0x4710cd
push eax
mov eax, esi
and eax, 0xfc
add eax, edx
push eax
lea eax, [ebp - 0xc]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ebx, dword [ebp - 0xc]
add esp, 0xc
mov edx, dword [ebp + 8]
sar esi, 2
test esi, esi
je 0x4710dd
xor ebx, dword [edx + esi*4 - 4]
dec esi
test esi, esi
jne 0x4710d4
mov eax, 0xd1b1b919
mul ebx
shr edx, 0xd
imul eax, edx, 0x2711
sub ebx, eax
mov eax, dword [ebp - 8]
mov esi, dword [eax + ebx*4 + 4]
test esi, esi
je 0x471138
nop word [eax + eax]
mov ecx, dword [ebp + 8]
mov eax, dword [esi]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x471125
test dl, dl
je 0x471121
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x471125
add eax, 2
add ecx, 2
test dl, dl
jne 0x471105
xor eax, eax
jmp 0x47112a
sbb eax, eax
or eax, 1
test eax, eax
je 0x471187
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x471100
mov eax, dword [ebp - 8]
inc dword [eax]
push 0x14
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x471154
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], edi
push 0x450
push str.Misc.c
push dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
push 0
push dword [ebp + 8]
push esi
call fcn.0047ce40
mov eax, dword [0x591f78]
add esp, 0x18
mov eax, dword [eax + ebx*4 + 4]
mov dword [esi + 0x10], eax
mov eax, dword [0x591f78]
mov dword [eax + ebx*4 + 4], esi
mov edx, dword [esi + 8]
xor ebx, ebx
test edx, edx
jle 0x4711a6
mov ecx, dword [esi + 0xc]
mov edi, dword [ebp + 0xc]
mov eax, dword [ecx]
cmp dword [eax], edi
je 0x4711a4
inc ebx
add ecx, 4
cmp ebx, edx
jl 0x471196
xor edi, edi
cmp ebx, edx
jne 0x47126d
push 0x20
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x4711ca
xorps xmm0, xmm0
movups xmmword [eax], xmm0
movups xmmword [eax + 0x10], xmm0
inc dword [esi + 8]
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__set_errno]
mov eax, dword [esi + 8]
shl eax, 2
push eax
push dword [esi + 0xc]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 0xc
mov dword [ebp - 0xc], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0xc
jne 0x471261
call fcn.00493410
test eax, eax
je 0x47125c
call fcn.00493410
cmp dword [eax], 0
je 0x47125c
mov eax, dword [0x52e820]
test eax, eax
je 0x47121a
mov eax, dword [eax + 0x190]
jmp 0x47121f
mov eax, dword [0x52e824]
mov dword [ebp - 0xc], eax
call fcn.00493410
test eax, eax
je 0x471234
call fcn.00493410
mov eax, dword [eax]
jmp 0x471236
xor eax, eax
push str.Error_allocating_memory__
push str.Error_allocating_memory__
push dword [0x52e820]
push dword [ebp - 0xc]
push 0
push 0x459
push str.Misc.c
push 3
call eax
add esp, 0x20
mov eax, dword [esi + 0xc]
jmp 0x471267
mov eax, dword [ebp - 0xc]
mov dword [esi + 0xc], eax
mov ecx, dword [ebp - 8]
mov dword [eax + ebx*4], ecx
mov eax, dword [esi + 0xc]
mov esi, dword [eax + ebx*4]
mov ebx, dword [ebp + 0x14]
mov eax, ebx
sub eax, 0
je 0x471298
sub eax, 1
je 0x471293
sub eax, 1
jne 0x47129e
movsd xmm0, qword [ebp + 0x18]
movsd qword [ebp - 0x18], xmm0
jmp 0x47129e
mov edi, dword [ebp + 0x18]
jmp 0x47129e
mov eax, dword [ebp + 0x18]
mov dword [ebp - 4], eax
cmp dword [esi], 0
je 0x4712d2
mov eax, dword [esi + 8]
sub eax, 0
je 0x4712cb
sub eax, 1
je 0x4712bf
sub eax, 1
jne 0x4712d2
xorps xmm0, xmm0
movsd qword [esi + 0x10], xmm0
jmp 0x4712d2
push dword [esi + 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [esi + 0x10], 0
mov eax, ebx
sub eax, 0
je 0x471310
sub eax, 1
je 0x4712ef
movsd xmm0, qword [ebp - 0x18]
sub eax, 1
jne 0x47131b
movsd qword [esi + 0x10], xmm0
jmp 0x47131b
push 0x47e
push str.Misc.c
push dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
lea eax, [esi + 0x10]
push 0
push edi
push eax
call fcn.0047ce40
add esp, 0x18
jmp 0x471316
mov eax, dword [ebp - 4]
mov dword [esi + 0x10], eax
movsd xmm0, qword [ebp - 0x18]
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x4713dd
cmp dword [ecx + 8], ebx
jne 0x471353
mov eax, ebx
sub eax, 0
je 0x4713d0
sub eax, 1
je 0x47135d
sub eax, 1
jne 0x47142f
ucomisd xmm0, qword [ecx + 0x10]
lahf
test ah, 0x44
jnp 0x47142f
mov edx, 1
jmp 0x471431
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x4713b9
cmp byte [eax], 0
je 0x4713b9
test edi, edi
je 0x4713ad
cmp byte [edi], 0
je 0x4713ad
mov cl, byte [edi]
cmp cl, byte [eax]
jne 0x47139c
test cl, cl
je 0x47138e
mov cl, byte [edi + 1]
cmp cl, byte [eax + 1]
jne 0x47139c
add edi, 2
add eax, 2
test cl, cl
jne 0x471372
xor eax, eax
xor edx, edx
test eax, eax
setne dl
jmp 0x471431
sbb eax, eax
xor edx, edx
or eax, 1
test eax, eax
setne dl
jmp 0x471431
or eax, 0xffffffff
xor edx, edx
test eax, eax
setne dl
jmp 0x471431
test edi, edi
je 0x47138e
cmp byte [edi], 0
je 0x47138e
mov eax, 1
xor edx, edx
test eax, eax
setne dl
jmp 0x471431
mov eax, dword [ebp - 4]
xor edx, edx
cmp eax, dword [ecx + 0x10]
setne dl
jmp 0x471431
test byte [ebp + 0x10], 2
je 0x47147e
push 0x20
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x471448
mov ecx, dword [ebp + 0xc]
xorps xmm0, xmm0
movups xmmword [eax], xmm0
movups xmmword [eax + 0x10], xmm0
mov eax, dword [esi + 0x18]
mov dword [eax + 8], ebx
mov eax, dword [esi + 0x18]
mov dword [eax], ecx
mov eax, ebx
sub eax, 0
je 0x471473
sub eax, 1
je 0x47144f
sub eax, 1
jne 0x47142f
mov eax, dword [esi + 0x18]
movsd xmm0, qword [ebp - 0x18]
movsd qword [eax + 0x10], xmm0
xor edx, edx
mov eax, dword [ebp + 0xc]
push edx
mov dword [esi], eax
lea eax, [esi + 4]
push 1
push eax
mov dword [esi + 8], ebx
call fcn.00481a00
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x18]
push 0x4a2
push str.Misc.c
push dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add eax, 0x10
push 0
push edi
push eax
call fcn.0047ce40
add esp, 0x18
jmp 0x47142f
mov eax, dword [esi + 0x18]
mov ecx, dword [ebp - 4]
mov dword [eax + 0x10], ecx
jmp 0x47142f
mov eax, ebx
sub eax, 0
je 0x4714ba
sub eax, 1
je 0x4714a4
sub eax, 1
jne 0x47142f
ucomisd xmm0, qword [0x4f4938]
lahf
test ah, 0x44
jnp 0x47142f
mov edx, 1
jmp 0x471431
test edi, edi
mov eax, 0x4eb673
cmovne eax, edi
xor edx, edx
cmp byte [eax], dl
setne dl
jmp 0x471431
xor edx, edx
cmp dword [ebp - 4], edx
setne dl
jmp 0x471431