Function at 0x439560
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov eax, dword [esp + 0x54]
mov ebx, 0xf
test eax, eax
je 0x43969e
cmp byte [edx], 0
je 0x4396a5
lea ebx, [eax + 3]
mov ebp, ebx
and ebp, 0xfffffffc
cmp ebp, 0x7ffffffd
jae 0x4396c4
mov esi, 4
test ebp, ebp
mov eax, 4
mov dword [esp + 0xc], ecx
je 0x4395bf
mov edi, edx
mov ecx, 8
mov edx, ebp
call fcn.00494530
test eax, eax
je 0x4396c4
mov edx, edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x54]
mov edi, ebx
mov dword [esp], ebx
xor ebx, ebx
shr edi, 2
mov ecx, eax
and ecx, 3
cmovne esi, ecx
mov ecx, eax
setne bl
mov eax, dword [esp + 0x1c]
shr ecx, 2
add ebx, ecx
mov ecx, dword [esp]
cmp ebx, edi
ja 0x4396fa
cmp ecx, 4
jb 0x439617
push ebp
push 0
push eax
mov ebp, edi
mov dword [esp + 0x14], ebx
mov edi, edx
mov ebx, eax
call sub.VCRUNTIME140.dll_memset
mov eax, ebx
mov ebx, dword [esp + 0x14]
mov edx, edi
mov edi, ebp
add esp, 0xc
test ebx, ebx
je 0x4396ac
lea ecx, [ebx - 1]
cmp ecx, edi
jae 0x4396b3
mov dword [esp + 8], ebx
mov cl, 1
xor ebp, ebp
xor ebx, ebx
mov dword [esp + 0x14], edi
mov dword [esp + 4], 0
mov edi, dword [esp + 0x54]
sub edi, ebx
cmovb edi, ebp
jbe 0x4396cb
mov byte [esp + 0x18], cl
mov ecx, dword [esp + 4]
dec esi
inc ecx
mov dword [esp + 0x10], ecx
xor ecx, ecx
nop
movzx ebp, byte [edx + ebx]
shl ecx, 8
inc ebx
or ecx, ebp
sub esi, 1
jb 0x439674
dec edi
jne 0x439660
jmp 0x4396c6
mov edi, dword [esp + 4]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 8]
not edi
mov dword [esp + 4], ebp
add edi, esi
cmp ebp, esi
mov esi, 4
mov ebp, 0
mov dword [eax + edi*4], ecx
setb cl
jne 0x439640
jmp 0x4396cb
mov esi, 0xf91d66
jmp 0x43971c
mov esi, 0xf91d75
jmp 0x43971c
mov ecx, dword [esp]
xor ebx, ebx
jmp 0x4396d7
mov ecx, eax
mov eax, dword [esp + 0x54]
dec esi
dec eax
cmp esi, eax
mov eax, ecx
mov ecx, dword [esp]
ja 0x4396fa
ud2
movzx ecx, byte [esp + 0x18]
test cl, 1
mov edi, dword [esp + 0x14]
mov ecx, dword [esp]
jne 0x4396fa
cmp ebx, dword [esp + 0x54]
jne 0x4396fa
mov ebp, eax
cmp ecx, 0x403
jbe 0x439737
mov ecx, dword [esp + 0xc]
mov ebx, 8
mov esi, 0xf91d94
jmp 0x43978f
mov esi, 0xf91d66
cmp ecx, 4
jb 0x439713
push eax
push 0
push dword [0xfd5200]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0xc]
mov ebx, 0xf
mov dword [ecx + 8], esi
mov dword [ecx + 0xc], ebx
mov dword [ecx + 4], 0
mov dword [ecx], 0
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, ecx
cmp ecx, 0x10
mov ecx, dword [esp + 0xc]
jae 0x439753
mov ebx, 0xf
mov esi, 0xf91d66
cmp eax, 4
jb 0x43971c
jmp 0x43978f
mov ebx, edi
mov edi, ecx
push ebx
mov esi, ebp
push ebp
call fcn.004e4430
add esp, 8
test eax, eax
je 0x439773
mov ebx, 0x10
mov esi, 0xf91d84
jmp 0x43978d
push ebx
push 3
push esi
call fcn.004e45a0
add esp, 0xc
test eax, eax
je 0x4397a7
mov ebx, 0xf
mov esi, 0xf91d66
mov ecx, edi
push ebp
push 0
push dword [0xfd5200]
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, edi
jmp 0x43971c
push dword [esi + 4]
push dword [esi]
call fcn.004e58f0
add esp, 8
mov dword [esp + 8], edx
mov ecx, esi
mov edx, ebx
mov dword [esp + 4], eax
mov dword [esp + 0x14], ebx
call fcn.00439bb0
mov edx, dword [esp + 0x60]
mov esi, dword [esp + 4]
mov ecx, dword [esp + 8]
mov ebx, eax
cmp edx, 0x400
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], ecx
jb 0x4396c4
mov eax, ebx
mov ecx, ebx
mov esi, 0xf926f6
shr eax, 2
shr ecx, 1
or ecx, eax
or ecx, ebx
and ecx, 1
lea eax, [ebx + ecx*8]
and eax, 0xfffffff8
cmp eax, edx
jb 0x439819
cmp ebx, dword [esp + 0x64]
mov esi, 0xf91d94
jbe 0x439834
push ebp
push 0
push dword [0xfd5200]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, 8
mov ecx, edi
jmp 0x43971c
mov edx, dword [esp]
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], ebx
and edx, 0x7fc
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], ebx
je 0x439879
mov ecx, 8
call fcn.00494530
test eax, eax
je 0x4396c4
mov edx, eax
jmp 0x43987e
mov edx, 4
xor eax, eax
cmp dword [esp], 0x20
mov ebx, ebp
jb 0x4398bc
mov eax, edi
xor ecx, ecx
pcmpeqd xmm0, xmm0
and eax, 0x1f8
movdqu xmm1, xmmword [ebx + ecx*4]
movdqu xmm2, xmmword [ebx + ecx*4 + 0x10]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [edx + ecx*4], xmm1
movdqu xmmword [edx + ecx*4 + 0x10], xmm2
add ecx, 8
cmp eax, ecx
jne 0x439895
jmp 0x4398c5
mov ecx, dword [ebx + eax*4]
not ecx
mov dword [edx + eax*4], ecx
inc eax
cmp edi, eax
jne 0x4398bc
mov eax, edi
or byte [edx], 1
mov dword [esp + 0x18], esi
mov dword [esp], edx
shl eax, 5
mov ecx, eax
sub ecx, dword [esp + 0x10]
je 0x43990e
mov edx, dword [esp]
mov esi, dword [esp]
mov edx, dword [edx + edi*4 - 4]
shl edx, cl
shr edx, cl
mov dword [esi + edi*4 - 4], edx
mov esi, dword [esp + 0x10]
mov edx, dword [esp]
sub esi, eax
push edi
push ebx
push edx
push edx
call fcn.004e46c0
mov edx, dword [esp + 0x10]
add esp, 0x10
inc esi
jne 0x4398fb
mov esi, edi
push edi
push ebx
push edx
push edx
call fcn.004e46c0
mov edx, dword [esp + 0x10]
add esp, 0x10
dec esi
jne 0x439910
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push edx
push edx
push edx
mov esi, edx
call fcn.004d4200
add esp, 0x18
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
push esi
push esi
call fcn.004d4200
add esp, 0x18
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
push esi
push esi
call fcn.004d4200
add esp, 0x18
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
push esi
push esi
call fcn.004d4200
add esp, 0x18
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
push esi
push esi
call fcn.004d4200
add esp, 0x18
mov edi, dword [esp + 0x5c]
cmp edi, 5
jbe 0x439997
mov dword [esp + 4], 0xf91d94
mov esi, 8
jmp 0x439a11
test edi, edi
mov dword [esp + 4], 0xf91d75
je 0x4399e0
mov ebx, dword [esp + 0x58]
mov esi, 0xf
cmp byte [ebx], 0
je 0x439a11
xor eax, eax
xor ecx, ecx
movzx edx, byte [ebx]
shld ecx, eax, 8
shl eax, 8
inc ebx
or eax, edx
dec edi
jne 0x4399b5
cmp eax, dword [esp + 0x68]
mov edi, ecx
mov dword [esp + 4], 0xf926f6
sbb edi, dword [esp + 0x6c]
jae 0x4399e7
mov esi, 8
jmp 0x439a11
mov esi, 0xf
jmp 0x439a11
test ecx, 0xfffffffe
mov esi, 8
mov dword [esp + 4], 0xf91d94
jne 0x439a11
movzx edx, dl
test dl, 1
jne 0x439a4f
mov esi, 0x10
mov dword [esp + 4], 0xf91d84
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], esi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [eax + 4], 0
mov dword [eax], 0
push ebp
push 0
push dword [0xfd5200]
call esi
push dword [esp]
push 0
push dword [0xfd5200]
call esi
jmp 0x43972f
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 8]
mov dword [edx], eax
mov eax, dword [esp + 0x14]
mov dword [edx + 4], ecx
mov dword [edx + 8], ebp
mov dword [edx + 0xc], eax
mov dword [edx + 0x10], edi
mov dword [edx + 0x14], esi
mov edi, dword [esp + 0x10]
mov esi, dword [esp]
mov dword [edx + 0x18], edi
mov dword [edx + 0x1c], esi
mov dword [edx + 0x20], eax
jmp 0x43972f