Function at 0x43dac0
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 0x43dcee
cmp dword [esp + 0x24], 0
mov esi, dword [esp + 0x28]
jne 0x43db31
test esi, esi
jne 0x43dcee
cmp dword [esp + 0x1c], 0
je 0x43dce7
test edi, edi
je 0x43dce7
cmp dword [esp + 0x20], 0
je 0x43dce7
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 + 0x56deb0]
mov eax, ebx
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x56deb0]
divsd xmm1, xmm0
movsd qword [esp + 0x30], xmm1
fld qword [esp + 0x30]
fstp qword [esp]
call fcn.0053af30
add esp, 8
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
call fcn.0053c991
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 0x43dbd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x43dcf3
mov esi, 1
mov dword [esp + 0x24], esi
cmp dword [esp + 0x28], esi
jb 0x43dcdb
push ebx
push 0
push dword [esp + 0x24]
call fcn.004ea420
xor ebx, ebx
add esp, 0xc
cmp dword [ebp + 0x20], ebx
jbe 0x43dc9c
nop dword [eax]
test ebx, ebx
jne 0x43dc3e
mov esi, dword [ebp + 0x1c]
push esi
push dword [ebp + 0x18]
push edi
call fcn.004ea7c0
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 0x43dc51
mov esi, dword [ebp + 0x14]
push esi
push dword [esp + 0x24]
push edi
call fcn.004ea7c0
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 0x43dbc3
mov eax, dword [esp + 0x1c]
mov edx, esi
mov ecx, eax
test edx, edx
je 0x43dc8e
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 0x43dc80
inc ebx
cmp ebx, dword [ebp + 0x20]
jb 0x43dc00
mov esi, dword [esp + 0x24]
cmp esi, dword [esp + 0x28]
je 0x43dcb4
mov ebx, dword [ebp + 0x14]
push ebx
push dword [esp + 0x20]
push dword [ebp + 0x24]
call fcn.004ea7c0
jmp 0x43dcc6
push dword [ebp + 0x28]
push dword [esp + 0x20]
push dword [ebp + 0x24]
call fcn.004ea7c0
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 0x43dbe3
mov dword [esp + 0x34], 1
xor ebx, ebx
jmp 0x43dcf3
mov ebx, 8
jmp 0x43dcf3
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 0x43dd0c
push eax
call esi
test edi, edi
je 0x43dd13
push edi
call esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x43dd1e
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