Function at 0x4012d3
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x34
push ebx
mov eax, edx
shr eax, 4
push ebp
push esi
mov dword [esp + 0xc], eax
shl eax, 4
xor ebp, ebp
mov esi, edx
sub esi, eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x48]
mov ebx, ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], esi
mov dword [eax], ebp
test edx, edx
jne 0x40130f
xor eax, eax
inc eax
jmp 0x40170b
mov eax, dword [0x40a2a0]
push edi
sub eax, ebp
je 0x40169e
dec eax
je 0x401516
dec eax
je 0x401418
dec eax
je 0x401336
xor eax, eax
inc eax
jmp 0x40170a
mov ecx, ebp
push 0x10
mov dword [esp + 0x1c], ecx
pop edi
cmp dword [esp + 0x10], ecx
jbe 0x40139e
lea eax, [esp + 0x34]
test ecx, ecx
mov ecx, dword [0x40a298]
mov edx, edi
push eax
je 0x401358
mov ecx, eax
call fcn.004018bb
test eax, eax
jne 0x40170a
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
shl edx, 4
add edx, dword [esp + 0x48]
sub ecx, dword [esp + 0x48]
mov esi, ebp
mov al, byte [ecx + edx]
xor al, byte [esp + esi + 0x34]
inc esi
mov byte [edx], al
inc edx
cmp esi, edi
jb 0x40137a
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
add ebx, edi
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [esp + 0x10]
jb 0x401345
test esi, esi
je 0x401702
lea eax, [esp + 0x34]
test ecx, ecx
mov ecx, dword [0x40a298]
mov edx, edi
push eax
je 0x4013b9
mov ecx, eax
call fcn.004018bb
test eax, eax
jne 0x40170a
test esi, esi
je 0x4013ec
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
shl edx, 4
add edx, dword [esp + 0x48]
sub ecx, dword [esp + 0x48]
mov al, byte [edx + ecx]
xor al, byte [esp + ebp + 0x34]
inc ebp
mov byte [edx], al
inc edx
cmp ebp, esi
jb 0x4013dd
mov ecx, dword [esp + 0x18]
cmp esi, edi
jae 0x401700
mov dl, byte [0x40a2a4]
shl ecx, 4
add ecx, dword [esp + 0x48]
mov al, byte [esp + esi + 0x34]
xor al, dl
mov byte [ecx + esi], al
inc esi
cmp esi, edi
jb 0x401405
jmp 0x401700
mov ecx, ebp
push 0x10
mov dword [esp + 0x1c], ecx
pop edi
cmp dword [esp + 0x10], ecx
jbe 0x40148e
lea eax, [esp + 0x34]
mov edx, edi
push eax
test ecx, ecx
jne 0x40143a
mov ecx, dword [0x40a298]
jmp 0x401448
mov eax, ecx
mov ecx, dword [esp + 0x4c]
shl eax, 4
add ecx, 0xfffffff0
add ecx, eax
call fcn.004018bb
test eax, eax
jne 0x40170a
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
shl edx, 4
add edx, dword [esp + 0x48]
sub ecx, dword [esp + 0x48]
mov esi, ebp
mov al, byte [edx + ecx]
xor al, byte [esp + esi + 0x34]
inc esi
mov byte [edx], al
inc edx
cmp esi, edi
jb 0x40146a
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
add ebx, edi
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [esp + 0x10]
jb 0x401427
test esi, esi
je 0x401702
lea eax, [esp + 0x34]
mov edx, edi
push eax
test ecx, ecx
jne 0x4014a9
mov ecx, dword [0x40a298]
jmp 0x4014b7
mov eax, ecx
mov ecx, dword [esp + 0x4c]
shl eax, 4
add ecx, 0xfffffff0
add ecx, eax
call fcn.004018bb
test eax, eax
jne 0x40170a
test esi, esi
je 0x4014ea
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
shl edx, 4
add edx, dword [esp + 0x48]
sub ecx, dword [esp + 0x48]
mov al, byte [edx + ecx]
xor al, byte [esp + ebp + 0x34]
inc ebp
mov byte [edx], al
inc edx
cmp ebp, esi
jb 0x4014db
mov ecx, dword [esp + 0x18]
cmp esi, edi
jae 0x401700
mov dl, byte [0x40a2a4]
shl ecx, 4
add ecx, dword [esp + 0x48]
mov al, byte [esp + esi + 0x34]
xor al, dl
mov byte [ecx + esi], al
inc esi
cmp esi, edi
jb 0x401503
jmp 0x401700
mov edx, dword [esp + 0x10]
mov eax, dword [0x40a298]
push 0x10
mov dword [esp + 0x1c], ebp
pop edi
test edx, edx
je 0x4015da
sub eax, ecx
mov dword [esp + 0x30], eax
mov eax, ecx
lea ecx, [esp + 0x34]
sub eax, ecx
mov dword [esp + 0x28], eax
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x2c], ebp
test ebx, ebx
jne 0x401569
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x34]
add edx, ebp
add eax, edx
mov cl, byte [eax + ecx]
xor cl, byte [eax]
mov byte [edx], cl
mov edx, dword [esp + 0x48]
jmp 0x401582
mov edx, dword [esp + 0x48]
mov ecx, ebx
shl ecx, 4
lea eax, [ecx + ebp]
add ecx, ebp
mov al, byte [eax + edx - 0x10]
xor al, byte [ecx + esi]
mov byte [esp + ebp + 0x34], al
mov eax, dword [esp + 0x28]
inc ebp
cmp ebp, edi
jb 0x40154c
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
shl eax, 4
add eax, edx
push eax
mov edx, edi
lea ecx, [esp + 0x38]
xor ebp, ebp
call fcn.004018bb
test eax, eax
jne 0x40170a
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
add ebx, edi
inc eax
mov dword [esp + 0x18], eax
cmp eax, edx
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], ebx
jb 0x401540
mov ecx, dword [esp + 0x14]
mov eax, dword [0x40a298]
test esi, esi
je 0x401702
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
sub eax, ecx
mov dword [esp + 0x30], eax
mov eax, ecx
lea ecx, [esp + 0x34]
sub eax, ecx
mov dword [esp + 0x2c], eax
test edx, edx
jne 0x401619
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x34]
add edx, ebp
add eax, edx
mov cl, byte [eax + ecx]
xor cl, byte [eax]
mov byte [edx], cl
mov edx, dword [esp + 0x10]
jmp 0x401632
mov esi, dword [esp + 0x48]
lea eax, [ebx + ebp]
lea ecx, [ebx + ebp]
mov al, byte [eax + esi - 0x10]
xor al, byte [ecx + edi]
mov esi, dword [esp + 0x1c]
mov byte [esp + ebp + 0x34], al
mov eax, dword [esp + 0x2c]
inc ebp
cmp ebp, esi
jb 0x4015fc
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
push 0x10
pop edi
cmp esi, edi
jae 0x401690
mov eax, dword [0x40a298]
mov bl, byte [0x40a2a4]
lea ecx, [esp + 0x34]
sub eax, ecx
mov dword [esp + 0x30], eax
test edx, edx
jne 0x401672
lea ecx, [esp + 0x34]
add ecx, esi
mov al, byte [ecx + eax]
xor al, bl
mov byte [ecx], al
jmp 0x401683
mov ecx, dword [esp + 0x48]
lea eax, [esi + ebp]
mov al, byte [eax + ecx - 0x10]
xor al, bl
mov byte [esp + esi + 0x34], al
mov eax, dword [esp + 0x30]
inc esi
cmp esi, edi
jb 0x40165f
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x48]
add eax, ebp
mov edx, edi
lea ecx, [esp + 0x34]
jmp 0x4016f6
push 0x10
pop edi
cmp dword [esp + 0x10], ebx
jbe 0x4016e4
mov edx, dword [esp + 0x48]
mov eax, ecx
sub edx, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], edx
mov ecx, dword [esp + 0x20]
add eax, edx
push eax
mov edx, edi
call fcn.004018bb
test eax, eax
jne 0x40170a
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x30]
add ebx, edi
inc ebp
add eax, edi
mov dword [esp + 0x20], eax
cmp ebp, dword [esp + 0x10]
jb 0x4016b7
mov ecx, dword [esp + 0x14]
test esi, esi
je 0x401702
mov eax, dword [esp + 0x48]
add eax, dword [esp + 0x24]
add ecx, dword [esp + 0x24]
mov edx, esi
push eax
call fcn.004018bb
test eax, eax
jne 0x40170a
add ebx, edi
mov eax, dword [esp + 0x4c]
mov dword [eax], ebx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 8