Function at 0x477190
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor eax, eax
lea edi, [esi + 0x2b0]
push 0x68
push 4
mov ecx, edi
lea ebp, [esi + 0xc]
mov dword [esp + 0x1c], eax
mov dword [esi + 0x394], eax
mov dword [esi + 0x390], eax
mov dword [esi + 0x38c], eax
mov dword [esi + 0x388], eax
mov dword [esi + 0x384], eax
mov dword [esi + 0x380], eax
mov dword [esi + 0x398], eax
call fcn.0047f1a0
mov ebx, dword [esi + 0x2b4]
lea eax, [esp + 0x12]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebp
mov ecx, edi
call fcn.0047f410
test eax, eax
je 0x47720e
movsx edx, word [esp + 0x12]
mov dword [esi + 0x2a4], edx
mov dword [esp + 0x1c], 0
jmp 0x477254
mov ecx, 0xfffffff4
mov eax, ebp
sub ecx, esi
mov dl, byte [eax]
xor dl, 1
mov byte [eax], dl
inc eax
lea edx, [ecx + eax]
cmp edx, 0x68
jl 0x477217
lea eax, [esp + 0x12]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebp
mov ecx, edi
call fcn.0047f410
test eax, eax
je 0x4774a9
movsx edx, word [esp + 0x12]
mov dword [esi + 0x2a4], edx
mov dword [esp + 0x1c], 1
xor eax, eax
test ebx, ebx
jle 0x477269
mov ecx, dword [esp + 0x18]
mov dl, byte [eax + ecx]
mov byte [eax + ebp], dl
inc eax
cmp eax, ebx
jl 0x47725e
mov eax, dword [esi + 4]
test eax, eax
je 0x477408
cmp eax, 5
je 0x47740d
mov eax, dword [esi + 0x3b8]
test eax, eax
lea ebx, [ebp + eax]
lea edi, [ebx - 1]
jle 0x4772ba
mov ebp, eax
mov ecx, dword [esi + 0x384]
xor eax, eax
shl ecx, 1
mov dword [esi + 0x384], ecx
mov al, byte [edi]
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
add eax, ecx
dec edi
dec ebp
mov dword [esi + 0x384], eax
jne 0x477290
mov ebp, dword [esi + 0x3bc]
add ebx, ebp
test ebp, ebp
lea edi, [ebx - 1]
jle 0x4772f3
mov ecx, dword [esi + 0x398]
xor eax, eax
shl ecx, 1
mov dword [esi + 0x398], ecx
mov al, byte [edi]
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
add eax, ecx
dec edi
dec ebp
mov dword [esi + 0x398], eax
jne 0x4772c9
mov eax, dword [esi + 0x3c0]
add ebx, eax
test eax, eax
lea ecx, [ebx - 1]
jle 0x477323
mov edi, eax
xor eax, eax
mov al, byte [ecx]
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x14]
dec ecx
dec edi
lea eax, [eax + edx*2]
mov dword [esp + 0x14], eax
jne 0x477304
mov eax, dword [esi + 4]
cmp eax, 2
jne 0x477337
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x388], ecx
jmp 0x477346
cmp eax, 3
jne 0x477346
mov edx, dword [esp + 0x14]
mov dword [esi + 0x38c], edx
mov ebp, dword [esi + 0x3c4]
add ebx, ebp
test ebp, ebp
lea edi, [ebx - 1]
jle 0x47737f
mov ecx, dword [esi + 0x390]
xor eax, eax
shl ecx, 1
mov dword [esi + 0x390], ecx
mov al, byte [edi]
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
add eax, ecx
dec edi
dec ebp
mov dword [esi + 0x390], eax
jne 0x477355
mov ebp, dword [esi + 0x3c8]
add ebx, ebp
test ebp, ebp
lea edi, [ebx - 1]
jle 0x4773b8
mov ecx, dword [esi + 0x394]
xor eax, eax
shl ecx, 1
mov dword [esi + 0x394], ecx
mov al, byte [edi]
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
add eax, ecx
dec edi
dec ebp
mov dword [esi + 0x394], eax
jne 0x47738e
mov ebp, dword [esi + 0x3b4]
test ebp, ebp
lea edi, [ebp + ebx - 1]
jle 0x477495
mov ecx, dword [esi + 0x380]
xor eax, eax
shl ecx, 1
mov dword [esi + 0x380], ecx
mov al, byte [edi]
cdq
xor eax, edx
sub eax, edx
and eax, 1
xor eax, edx
sub eax, edx
add eax, ecx
dec edi
dec ebp
mov dword [esi + 0x380], eax
jne 0x4773ca
mov edx, dword [esp + 0x1c]
xor eax, eax
test edx, edx
setne al
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
cmp eax, 5
jne 0x477469
xor al, al
xor ecx, ecx
mov byte [esi + 0x39c], al
mov dl, byte [ecx + ebp]
shl dl, cl
or al, dl
inc ecx
cmp ecx, 8
jl 0x477417
mov byte [esi + 0x39c], al
mov edi, 8
xor edx, edx
xor al, al
xor ecx, ecx
cmp edi, 0x4c
jge 0x477442
mov bl, byte [edi + ebp]
shl bl, cl
or al, bl
inc edi
inc ecx
cmp ecx, 8
jl 0x477435
mov byte [edx + esi + 0x39d], al
inc edx
cmp edx, 9
jl 0x477431
mov edx, dword [esp + 0x1c]
xor eax, eax
test edx, edx
setne al
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test eax, eax
jne 0x477495
xor edx, edx
xor edi, edi
xor al, al
xor ecx, ecx
cmp edi, 0x4c
jge 0x477482
mov bl, byte [edi + ebp]
shl bl, cl
or al, bl
inc edi
inc ecx
cmp ecx, 8
jl 0x477475
mov byte [edx + esi + 0x3aa], al
inc edx
cmp edx, 0xa
jl 0x477471
mov edx, dword [esp + 0x1c]
xor eax, eax
test edx, edx
setne al
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov dword [esi + 0x2a4], 0x2710
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret