Function at 0x4208e4
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x5c]
mov eax, esi
mul edi
cmp eax, 0x40000000
sbb edx, 0
jae 0x420909
mov ebx, dword [esp + 0x58]
test ebx, ebx
je 0x42091a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x1b
jmp 0x4209ff
mov ecx, dword [esp + 0x54]
cmp ecx, 2
mov eax, ebx
sbb eax, 0
jb 0x4209f3
movd xmm0, ecx
movd xmm1, ebx
punpckldq xmm0, xmm1
movdqa xmm1, xmm0
psrlw xmm1, 1
pand xmm1, xmmword [0x438820]
psubb xmm0, xmm1
movdqa xmm1, xmmword [0x438830]
movdqa xmm2, xmm0
pand xmm2, xmm1
psrlw xmm0, 2
pand xmm0, xmm1
paddb xmm0, xmm2
movdqa xmm1, xmm0
psrlw xmm1, 4
paddb xmm1, xmm0
pand xmm1, xmmword [0x438840]
pxor xmm0, xmm0
psadbw xmm0, xmm1
movd eax, xmm0
cmp eax, 2
jae 0x4209f3
test edi, edi
je 0x4209f3
test esi, esi
je 0x4209f3
mov eax, 0x1ffffff
xor edx, edx
div esi
cmp edi, 0xffffff
ja 0x4209e5
cmp eax, edi
jb 0x4209e5
xor ecx, ecx
mov eax, 0x1ffffff
xor edx, edx
div edi
cmp eax, dword [esp + 0x54]
sbb ecx, ebx
mov eax, dword [esp + 0x54]
jb 0x4209e5
mov edx, edi
shl edx, 7
mov ecx, edx
imul ecx, esi
mov esi, edx
imul esi, eax
mov ebp, ecx
add ebp, esi
jb 0x4209e5
mov ebx, edi
shl ebx, 8
lea eax, [ebx + 0x40]
add ebp, eax
jae 0x420a0c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0xc
jmp 0x4209ff
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
xor ebx, ebx
dec ebx
mov eax, ebx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 4], ebx
mov dword [esp], esi
mov dword [esp + 0xc], edx
mov esi, dword [esp + 0x40]
cmp dword [esi + 8], ebp
mov dword [esp + 0x14], ecx
jae 0x420a46
push esi
call fcn.004215f5
add esp, 4
xor ebx, ebx
dec ebx
test eax, eax
jne 0x420a02
push ebp
push esi
call fcn.004215a8
add esp, 8
test eax, eax
mov ecx, dword [esp + 0x14]
je 0x420a02
mov ebx, dword [esi + 4]
lea ebp, [ebx + ecx]
mov esi, dword [esp]
add esi, ebp
push ecx
push ebx
push 0
push 1
push dword [esp + 0x60]
push dword [esp + 0x60]
push dword [esp + 0x60]
push dword [esp + 0x60]
call fcn.00420fdc
add esp, 0x20
mov ecx, edi
shl ecx, 5
mov eax, dword [esp + 0xc]
add eax, esi
mov dword [esp + 0x20], eax
add dword [esp + 4], esi
mov eax, dword [esp + 0x54]
dec eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], ebx
mov edx, ecx
mov dword [esp], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 8], ecx
mov dword [esp + 0x28], ebx
mov eax, ebx
mov ebx, dword [eax]
mov dword [esi], ebx
add esi, 4
add eax, 4
dec edx
jne 0x420aaa
xor ebx, ebx
xor ebp, ebp
mov esi, dword [esp]
mov eax, dword [esp + 8]
imul eax, ebx
mov ecx, dword [esp + 0x10]
lea eax, [ecx + eax*4]
push dword [esp + 0xc]
push esi
push eax
call fcn.0042bc88
add esp, 0xc
mov ecx, esi
mov edi, dword [esp + 0x20]
mov edx, edi
mov eax, dword [esp + 0x5c]
push eax
push dword [esp + 8]
call fcn.00420c28
add esp, 8
mov eax, ebx
or eax, 1
imul eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
lea eax, [ecx + eax*4]
push dword [esp + 0xc]
push edi
push eax
call fcn.0042bc88
add esp, 0xc
mov ecx, edi
mov edx, esi
push dword [esp + 0x5c]
push dword [esp + 8]
call fcn.00420c28
add esp, 8
add ebx, 2
adc ebp, 0
cmp ebx, dword [esp + 0x54]
mov eax, ebp
sbb eax, dword [esp + 0x58]
jb 0x420abe
xor ebp, ebp
xor ebx, ebx
mov edx, dword [esp + 8]
mov eax, dword [esi + edx*4 - 0x40]
and eax, dword [esp + 0x1c]
imul eax, edx
mov ecx, dword [esp + 0x10]
lea eax, [ecx + eax*4]
mov edi, dword [eax]
xor dword [esi], edi
add esi, 4
add eax, 4
dec edx
jne 0x420b52
mov esi, dword [esp]
mov ecx, esi
mov edi, dword [esp + 0x20]
mov edx, edi
push dword [esp + 0x5c]
push dword [esp + 8]
call fcn.00420c28
add esp, 8
mov edx, dword [esp + 8]
mov eax, dword [esi + edx*8 - 0x40]
mov esi, edi
and eax, dword [esp + 0x1c]
imul eax, edx
mov ecx, dword [esp + 0x10]
lea eax, [ecx + eax*4]
mov ecx, edi
mov edi, dword [eax]
xor dword [ecx], edi
add ecx, 4
add eax, 4
dec edx
jne 0x420b94
mov ecx, esi
mov esi, dword [esp]
mov edx, esi
mov edi, dword [esp + 0x5c]
push edi
push dword [esp + 8]
call fcn.00420c28
add esp, 8
add ebp, 2
adc ebx, 0
cmp ebp, dword [esp + 0x54]
mov eax, ebx
sbb eax, dword [esp + 0x58]
jb 0x420b3c
xor eax, eax
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0x28]
mov ecx, dword [esi + eax*4]
mov dword [ebx + eax*4], ecx
inc eax
cmp edx, eax
jne 0x420bd9
mov ecx, dword [esp + 0x18]
inc ecx
add ebx, dword [esp + 0xc]
mov eax, dword [esp + 0x60]
mov dword [esp + 0x18], ecx
cmp ecx, eax
jne 0x420aa4
push dword [esp + 0x68]
push dword [esp + 0x68]
push 0
push 1
push dword [esp + 0x24]
push dword [esp + 0x38]
push dword [esp + 0x60]
push dword [esp + 0x60]
call fcn.00420fdc
add esp, 0x20
xor ebx, ebx
jmp 0x420a02