Function at 0x4108a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x475010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x144], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x120], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp + 0x28]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x128], eax
lea eax, [ebp - 0x150]
push esi
mov esi, dword [ebp + 8]
push eax
mov dword [ebp - 0x114], esi
call fcn.00408420
lea eax, [ebp - 0x138]
push eax
call fcn.00408420
lea eax, [esi + 0x4c]
push 0
push eax
call fcn.00408290
add esp, 0x10
cmp eax, 1
je 0x410925
pop esi
mov eax, 0xffffb080
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423606
mov esp, ebp
pop ebp
ret
push edi
push 0
push ebx
call fcn.00408290
test eax, eax
lea eax, [ebp - 0x150]
push ebx
push eax
sete byte [ebp - 0x124]
call fcn.004060d0
mov edi, dword [ebp + 0x20]
add esp, 0x10
test eax, eax
jne 0x410ad2
push ebx
lea eax, [esi + 0x4c]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.0040a460
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x410ad4
push dword [ebp - 0x124]
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x150]
push eax
call fcn.0040d3a0
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x118], ebx
test ebx, ebx
jne 0x410ad4
lea eax, [edi + 1]
push eax
lea eax, [ebp - 0x10c]
push ebx
push eax
call fcn.00424dd0
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x11c], ecx
test edi, edi
je 0x410a44
movzx eax, byte [ebp + 0x1c]
mov dword [ebp - 0x13c], eax
nop word [eax + eax]
xor esi, esi
test eax, eax
je 0x410a2d
lea eax, [ebp - 0x10c]
mov ebx, ecx
add eax, ecx
mov dword [ebp - 0x140], eax
mov al, byte [eax]
mov byte [ebp - 0x10d], al
nop
lea eax, [ebp - 0x150]
push ebx
push eax
call fcn.00408290
mov ecx, esi
add esp, 8
shl al, cl
inc esi
mov cl, byte [ebp - 0x10d]
add ebx, edi
or cl, al
mov eax, dword [ebp - 0x13c]
mov byte [ebp - 0x10d], cl
cmp esi, eax
jb 0x4109f0
mov edx, dword [ebp - 0x140]
mov byte [edx], cl
mov ecx, dword [ebp - 0x11c]
inc ecx
mov dword [ebp - 0x11c], ecx
cmp ecx, edi
jb 0x4109d0
mov esi, dword [ebp - 0x114]
mov ebx, dword [ebp - 0x118]
xor al, al
mov byte [ebp - 0x10d], al
cmp edi, 1
jb 0x410ad4
mov esi, 1
nop word [eax + eax]
mov bl, byte [ebp + esi - 0x10c]
mov bh, 1
mov dl, byte [ebp + esi - 0x10d]
mov dh, bl
and bl, byte [ebp - 0x10d]
xor dh, al
mov al, dh
movzx ecx, dl
and al, 1
sub bh, al
movzx eax, bh
imul ecx, eax
shl bh, 7
or bh, dl
mov byte [ebp + esi - 0x10d], bh
mov al, cl
xor cl, dh
and al, dh
mov byte [ebp + esi - 0x10c], cl
or al, bl
inc esi
mov byte [ebp - 0x10d], al
cmp esi, edi
jbe 0x410a60
lea eax, [ebp - 0x138]
push eax
call fcn.004079e0
lea eax, [ebp - 0x150]
push eax
call fcn.004079e0
mov esi, dword [ebp - 0x114]
add esp, 8
jmp 0x410af7
mov ebx, eax
lea eax, [ebp - 0x138]
push eax
call fcn.004079e0
lea eax, [ebp - 0x150]
push eax
call fcn.004079e0
add esp, 8
test ebx, ebx
jne 0x410ce0
lea eax, [ebp - 0x174]
push eax
call fcn.00408420
lea eax, [ebp - 0x168]
push eax
call fcn.00408420
lea eax, [ebp - 0x15c]
push eax
call fcn.00408420
movzx eax, byte [ebp + edi - 0x10c]
mov ebx, dword [ebp - 0x144]
push eax
push dword [ebp + 0x18]
push dword [ebp - 0x120]
push ebx
push esi
call fcn.00411dd0
mov esi, eax
add esp, 0x20
test esi, esi
jne 0x410be9
lea eax, [ebx + 0x18]
push 1
push eax
call fcn.00408db0
mov esi, eax
add esp, 8
test esi, esi
jne 0x410be9
push dword [ebp - 0x128]
push dword [ebp - 0x12c]
push ebx
push dword [ebp - 0x114]
call fcn.00411a60
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x410be9
test edi, edi
je 0x410be9
push ebx
push ebx
push dword [ebp - 0x114]
dec edi
call fcn.0040fed0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x410be9
movzx eax, byte [ebp + edi - 0x10c]
push eax
push dword [ebp + 0x18]
lea eax, [ebp - 0x174]
push dword [ebp - 0x120]
push eax
push dword [ebp - 0x114]
call fcn.00411dd0
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x410be9
lea eax, [ebp - 0x174]
push eax
push ebx
push ebx
push dword [ebp - 0x114]
call fcn.0040f7a0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x410be9
test edi, edi
jne 0x410b84
lea eax, [ebp - 0x174]
push eax
call fcn.004079e0
lea eax, [ebp - 0x168]
push eax
call fcn.004079e0
lea eax, [ebp - 0x15c]
push eax
call fcn.004079e0
add esp, 0xc
test esi, esi
jne 0x410ccd
lea eax, [ebp - 0x138]
push eax
call fcn.00408420
mov esi, dword [ebp - 0x114]
lea eax, [ebx + 0xc]
push eax
lea eax, [esi + 4]
push eax
lea eax, [ebp - 0x138]
push eax
call fcn.0040a460
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x410c72
push eax
lea edi, [ebx + 0xc]
push edi
call fcn.00405fb0
test eax, eax
setne al
and al, byte [ebp - 0x124]
movzx eax, al
push eax
lea eax, [ebp - 0x138]
push eax
push edi
call fcn.0040d3a0
add esp, 0x14
mov edi, eax
lea eax, [ebp - 0x138]
push eax
call fcn.004079e0
add esp, 4
test edi, edi
jne 0x410cba
push dword [ebp - 0x128]
push dword [ebp - 0x12c]
push ebx
push esi
call fcn.00411a60
add esp, 0x10
test eax, eax
jne 0x410ce2
push ebx
push esi
call fcn.00410d00
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423606
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423606
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423606
mov esp, ebp
pop ebp
ret
mov eax, ebx
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00423606
mov esp, ebp
pop ebp
ret