Function at 0x401600
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x423040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x88], ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
cmp edx, 2
jle 0x401912
movsx esi, byte [ecx]
sub edx, 2
movzx eax, byte [ecx + 1]
add ecx, 2
shl esi, 8
or esi, eax
mov dword [ebp - 0x8c], ecx
mov eax, edx
mov dword [ebp - 0x94], esi
and eax, reloc.WS2_32.dll_ntohs
jns 0x401657
dec eax
or eax, 0xfffffff0
inc eax
mov esi, edx
sub esi, eax
test eax, eax
cmove esi, edx
mov edx, edi
add esi, 0x10
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x401668
sub edx, ecx
test esi, esi
je 0x401912
mov eax, esi
and eax, reloc.WS2_32.dll_ntohs
jns 0x401689
dec eax
or eax, 0xfffffff0
add eax, 1
jne 0x401912
cmp edx, 0x10
jne 0x401912
mov ecx, edi
call fcn.00401060
test esi, esi
jle 0x4018fb
mov ecx, dword [ebp - 0x8c]
lea eax, [esi - 1]
sub ecx, ebx
shr eax, 4
inc eax
mov dword [ebp - 0x8c], ecx
lea edi, [ebp - 0x44]
mov dword [ebp - 0x90], eax
xor edx, edx
lea esi, [ebp - 0x24]
add ecx, ebx
lea ebx, [ebp - 0x14]
nop
movzx eax, byte [ecx]
lea ecx, [ecx + 4]
mov dword [edi + edx*4], eax
movzx eax, byte [ecx - 3]
mov dword [ebp + edx*4 - 0x34], eax
movzx eax, byte [ecx - 2]
mov dword [esi + edx*4], eax
movzx eax, byte [ecx - 1]
mov dword [ebx + edx*4], eax
inc edx
cmp edx, 4
jl 0x4016d0
xor edx, edx
nop word [eax + eax]
mov ecx, dword [edx + 0x426178]
mov eax, ecx
sar eax, 0x18
movzx eax, al
xor dword [ebp + edx - 0x44], eax
mov eax, ecx
sar eax, 0x10
movzx eax, al
xor dword [ebp + edx - 0x34], eax
mov eax, ecx
sar eax, 8
movzx eax, al
xor dword [ebp + edx - 0x24], eax
movzx eax, cl
xor dword [ebp + edx - 0x14], eax
add edx, 4
cmp edx, 0x10
jl 0x401700
mov edi, 0x42616c
nop
lea ecx, [ebp - 0x44]
call fcn.004013c0
lea ecx, [ebp - 0x44]
call fcn.00401460
lea ecx, [ebp - 0x44]
call fcn.00401530
mov ecx, dword [edi - 4]
mov eax, ecx
sar eax, 0x18
movzx eax, al
mov dword [ebp - 0x84], eax
mov edx, dword [edi]
mov eax, edx
sar eax, 0x18
movzx eax, al
mov ebx, dword [edi + 4]
mov dword [ebp - 0x80], eax
mov eax, ebx
sar eax, 0x18
movzx eax, al
mov esi, dword [edi + 8]
mov dword [ebp - 0x7c], eax
mov eax, esi
sar eax, 0x18
movzx eax, al
mov dword [ebp - 0x78], eax
mov eax, ecx
sar eax, 0x10
movzx eax, al
mov dword [ebp - 0x74], eax
mov eax, edx
sar eax, 0x10
movzx eax, al
mov dword [ebp - 0x70], eax
mov eax, ebx
sar eax, 0x10
movzx eax, al
mov dword [ebp - 0x6c], eax
mov eax, esi
sar eax, 0x10
movzx eax, al
mov dword [ebp - 0x68], eax
mov eax, ecx
sar eax, 8
movzx eax, al
mov dword [ebp - 0x64], eax
mov eax, edx
sar eax, 8
movzx eax, al
mov dword [ebp - 0x60], eax
mov eax, ebx
sar eax, 8
movzx eax, al
mov dword [ebp - 0x5c], eax
mov eax, esi
sar eax, 8
movzx eax, al
mov dword [ebp - 0x58], eax
movzx eax, cl
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x54], eax
movzx eax, dl
mov dword [ebp - 0x50], eax
movzx eax, bl
mov dword [ebp - 0x4c], eax
mov eax, esi
movzx eax, al
mov dword [ebp - 0x48], eax
call fcn.00401530
xor eax, eax
mov ecx, dword [ebp + eax - 0x84]
xor dword [ebp + eax - 0x44], ecx
mov ecx, dword [ebp + eax - 0x80]
xor dword [ebp + eax - 0x40], ecx
mov ecx, dword [ebp + eax - 0x7c]
xor dword [ebp + eax - 0x3c], ecx
mov ecx, dword [ebp + eax - 0x78]
xor dword [ebp + eax - 0x38], ecx
add eax, 0x10
cmp eax, 0x40
jl 0x401811
sub edi, 0x10
cmp edi, 0x4260ec
jge 0x401740
lea ecx, [ebp - 0x44]
call fcn.004013c0
lea ecx, [ebp - 0x44]
call fcn.00401460
xor edx, edx
nop dword [eax]
mov ecx, dword [edx + 0x4260d8]
mov eax, ecx
sar eax, 0x18
movzx eax, al
xor dword [ebp + edx - 0x44], eax
mov eax, ecx
sar eax, 0x10
movzx eax, al
xor dword [ebp + edx - 0x34], eax
mov eax, ecx
sar eax, 8
movzx eax, al
xor dword [ebp + edx - 0x24], eax
movzx eax, cl
xor dword [ebp + edx - 0x14], eax
add edx, 4
cmp edx, 0x10
jl 0x401860
mov ecx, dword [ebp - 0x88]
lea edi, [ebp - 0x44]
xor edx, edx
lea ebx, [ebp - 0x24]
nop word [eax + eax]
movzx eax, byte [edi + edx*4]
lea ecx, [ecx + 4]
mov byte [ecx - 4], al
movzx eax, byte [ebp + edx*4 - 0x34]
mov byte [ecx - 3], al
movzx eax, byte [ebx + edx*4]
mov byte [ecx - 2], al
lea eax, [ebp - 0x14]
movzx eax, byte [eax + edx*4]
inc edx
mov byte [ecx - 1], al
cmp edx, 4
jl 0x4018b0
mov ebx, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x8c]
add ebx, 0x10
sub dword [ebp - 0x90], 1
mov dword [ebp - 0x88], ebx
jne 0x4016c5
mov eax, dword [ebp - 0x94]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041951c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041951c
mov esp, ebp
pop ebp
ret