Function at 0x43da10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push edi
push ebx
push 0
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x3c], 0
call esi
push ebx
push 0
mov dword [esp + 0x24], eax
call esi
mov ecx, dword [ebp + 0x1c]
add ecx, 4
mov dword [esp + 0x20], eax
cmp ecx, ebx
mov eax, ebx
cmova eax, ecx
push eax
push 0
call esi
cmp dword [ebp + 0x24], 0
xorps xmm0, xmm0
mov edi, eax
movlpd qword [esp + 0x38], xmm0
je 0x43dc3e
cmp dword [esp + 0x24], 0
mov esi, dword [esp + 0x28]
jne 0x43da81
test esi, esi
jne 0x43dc3e
cmp dword [esp + 0x1c], 0
je 0x43dc37
test edi, edi
je 0x43dc37
cmp dword [esp + 0x20], 0
je 0x43dc37
mov eax, dword [ebp + 0x28]
sub esp, 8
movd xmm0, ebx
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x56ad20]
mov eax, ebx
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x56ad20]
divsd xmm1, xmm0
movsd qword [esp + 0x30], xmm1
fld qword [esp + 0x30]
fstp qword [esp]
call fcn.005385e0
add esp, 8
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
call fcn.0053a051
mov dword [esp + 0x28], eax
dec eax
imul eax, ebx
push esi
push dword [esp + 0x28]
sub dword [ebp + 0x28], eax
lea eax, [esp + 0x40]
push eax
call dword [ebp + 8]
test eax, eax
jne 0x43db20
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x43dc43
mov esi, 1
mov dword [esp + 0x24], esi
cmp dword [esp + 0x28], esi
jb 0x43dc2b
push ebx
push 0
push dword [esp + 0x24]
call fcn.004e7ba0
xor ebx, ebx
add esp, 0xc
cmp dword [ebp + 0x20], ebx
jbe 0x43dbec
nop dword [eax]
test ebx, ebx
jne 0x43db8e
mov esi, dword [ebp + 0x1c]
push esi
push dword [ebp + 0x18]
push edi
call fcn.004e7f40
mov ecx, dword [esp + 0x30]
add esp, 0xc
mov eax, ecx
mov byte [edi + esi + 3], cl
shr eax, 0x18
mov byte [edi + esi], al
mov eax, ecx
shr eax, 0x10
mov byte [edi + esi + 1], al
mov eax, ecx
shr eax, 8
mov byte [edi + esi + 2], al
lea eax, [esi + 4]
mov esi, dword [ebp + 0x14]
jmp 0x43dba1
mov esi, dword [ebp + 0x14]
push esi
push dword [esp + 0x24]
push edi
call fcn.004e7f40
add esp, 0xc
mov eax, esi
push dword [esp + 0x20]
push eax
push edi
lea eax, [esp + 0x44]
push eax
call dword [ebp + 0xc]
test eax, eax
je 0x43db13
mov eax, dword [esp + 0x1c]
mov edx, esi
mov ecx, eax
test edx, edx
je 0x43dbde
mov esi, dword [esp + 0x20]
sub esi, eax
nop dword [eax]
mov al, byte [esi + ecx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub edx, 1
jne 0x43dbd0
inc ebx
cmp ebx, dword [ebp + 0x20]
jb 0x43db50
mov esi, dword [esp + 0x24]
cmp esi, dword [esp + 0x28]
je 0x43dc04
mov ebx, dword [ebp + 0x14]
push ebx
push dword [esp + 0x20]
push dword [ebp + 0x24]
call fcn.004e7f40
jmp 0x43dc16
push dword [ebp + 0x28]
push dword [esp + 0x20]
push dword [ebp + 0x24]
call fcn.004e7f40
mov ebx, dword [ebp + 0x14]
add dword [ebp + 0x24], ebx
inc esi
add esp, 0xc
mov dword [esp + 0x24], esi
cmp esi, dword [esp + 0x28]
jbe 0x43db33
mov dword [esp + 0x34], 1
xor ebx, ebx
jmp 0x43dc43
mov ebx, 8
jmp 0x43dc43
mov ebx, 0xa0
lea eax, [esp + 0x38]
push eax
call dword [ebp + 0x10]
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x43dc5c
push eax
call esi
test edi, edi
je 0x43dc63
push edi
call esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x43dc6e
push eax
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret