Function at 0x421300
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x47c070]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
xorps xmm0, xmm0
push esi
push edi
xor edi, edi
mov dword [ebp - 0x58], ebx
mov edx, dword [ebx + 0x2c]
mov esi, dword [ebx + 0x30]
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x20], edi
lea eax, [esi + edx]
movlpd qword [ebp - 0x50], xmm0
movlpd qword [ebp - 0x40], xmm0
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x5c], eax
ja 0x42134a
test esi, esi
je 0x4213a4
mov ah, byte [edx]
test ah, 0xf
mov al, ah
setne cl
shr al, 7
and cl, al
xor cl, 1
je 0x4213a4
test dword [ebx + 0x7c], 0x1000
jne 0x4213a4
mov dword [ebp - 0x54], 1
test ah, ah
js 0x421377
test ah, 0xf
jne 0x4213a7
test edi, edi
jne 0x421380
cmp esi, 5
jb 0x4213a7
mov eax, dword [edx + 1]
lea ecx, [eax + 5]
test edi, edi
jb 0x4213a7
ja 0x421390
cmp esi, ecx
jb 0x4213a7
add eax, 5
add eax, edx
sub esi, ecx
mov dword [ebp - 0x1c], eax
sbb edi, edi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x20], edi
jmp 0x4213a9
mov dword [ebp - 0x54], edi
mov eax, edx
test edi, edi
jne 0x4213c9
cmp esi, 2
jae 0x4213c9
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x34], eax
jmp 0x4214b7
mov cl, byte [eax + 1]
mov al, cl
shr cl, 5
and al, 0x7f
and cl, 4
movzx eax, al
cdq
mov edi, eax
mov dword [ebp - 0x24], edx
movzx eax, cl
mov ecx, dword [ebp - 0x24]
cdq
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edx
test ecx, ecx
ja 0x42142a
mov edx, edi
jb 0x4213fc
cmp edx, 0x7e
jae 0x421424
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x30]
jb 0x42141c
ja 0x42140b
cmp esi, dword [ebp - 0x34]
jb 0x42141c
mov edi, dword [ebp - 0x34]
mov esi, dword [ebp - 0x30]
add edi, 2
adc esi, 0
jmp 0x4214c3
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
jmp 0x42142d
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x20]
cmp edi, 0x7e
jne 0x42146a
test ecx, ecx
jne 0x42146a
mov edi, dword [ebp - 0x34]
mov esi, edx
add edi, 4
adc esi, ecx
cmp eax, esi
jb 0x421467
ja 0x42144b
cmp dword [ebp - 0x38], edi
jb 0x421467
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
cdq
mov dword [ebp - 0x24], edx
mov edx, eax
mov dword [ebp - 0x28], eax
jmp 0x4214c0
mov esi, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
mov eax, edx
add ecx, 0xa
mov dword [ebp - 0x4c], ecx
adc eax, 0
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], eax
jb 0x4214b1
ja 0x421486
cmp esi, ecx
jb 0x4214b1
mov eax, dword [ebp - 0x1c]
mov esi, dword [sym.imp.WS2_32.dll_ntohl]
push dword [eax + 2]
call esi
mov edi, eax
mov eax, dword [ebp - 0x1c]
push dword [eax + 6]
call esi
mov esi, dword [ebp - 0x28]
mov edx, eax
xor eax, eax
add edx, eax
adc eax, edi
mov edi, dword [ebp - 0x4c]
mov dword [ebp - 0x24], eax
jmp 0x4214c0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x40]
mov eax, dword [ebp - 0x20]
mov ecx, edi
add ecx, edx
mov dword [ebp - 0x4c], ecx
adc esi, dword [ebp - 0x24]
jne 0x4214d7
test ecx, ecx
je 0x42167d
cmp esi, eax
ja 0x42167d
jb 0x4214ea
cmp ecx, dword [ebp - 0x38]
ja 0x42167d
cmp dword [ebp - 0x30], 0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
lea eax, [edi + ecx]
mov dword [ebp - 0x18], eax
mov al, byte [ecx]
mov byte [ebp - 0x29], al
mov byte [ebp - 0x10], al
ja 0x42150a
cmp dword [ebp - 0x34], 0
jbe 0x421555
mov esi, dword [ebp - 0x24]
xorps xmm0, xmm0
movlpd qword [ebp - 0x40], xmm0
test esi, esi
jb 0x421555
ja 0x42151f
test edx, edx
je 0x421555
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x1c]
mov eax, ecx
and eax, 3
sub eax, dword [ebp - 0x34]
add eax, edi
mov al, byte [eax + esi]
mov esi, dword [ebp - 0x18]
xor byte [esi + ecx], al
add ecx, 1
adc ebx, 0
cmp ebx, dword [ebp - 0x24]
jb 0x421525
ja 0x42154c
cmp ecx, edx
jb 0x421525
mov ebx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x1c]
mov al, byte [ebp - 0x29]
cmp dword [ebp - 0x54], 0
je 0x421614
test al, al
js 0x4215aa
test al, 0xf
je 0x4215aa
mov esi, dword [ebx + 0x34]
mov eax, dword [ebx + 0x34]
add esi, 4
cmp esi, eax
ja 0x42157b
jae 0x421595
cmp esi, dword [ebx + 0x30]
jb 0x421595
push esi
push dword [ebx + 0x2c]
call fcn.00446510
add esp, 8
test eax, eax
jne 0x42158f
test esi, esi
jne 0x421595
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x34], esi
mov esi, dword [ebp - 0x44]
and byte [esi], 0xf0
lea ecx, [esi + 5]
mov dword [ebp - 0x1c], ecx
mov dword [esi + 1], 0
jmp 0x4215ad
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x5c]
sub edx, eax
push edx
push eax
push ecx
call fcn.00439500
mov eax, dword [ebp - 0x14]
add esp, 0xc
add dword [esi + 1], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x18]
mov cl, byte [ebp - 0x10]
add dword [ebx + 0x30], eax
test cl, cl
jns 0x421653
mov edx, dword [ebx + 0x64]
lea eax, [esi + 5]
mov dword [ebp - 0x18], eax
test cl, 8
mov eax, dword [esi + 1]
mov ecx, ebx
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
je 0x421602
push 0x72
call fcn.00417f20
mov esi, dword [esi + 1]
add esp, 8
add esi, 5
jmp 0x421634
push 0x71
call fcn.00417f20
mov esi, dword [esi + 1]
add esp, 8
add esi, 5
jmp 0x421634
mov edx, dword [ebx + 0x64]
test al, 8
lea eax, [ebp - 0x18]
mov ecx, ebx
push eax
je 0x421625
push 0x72
jmp 0x421627
push 0x71
call fcn.00417f20
mov esi, dword [ebp - 0x4c]
add esp, 8
test esi, esi
je 0x421653
mov eax, dword [ebx + 0x30]
cmp esi, eax
ja 0x421653
mov ecx, dword [ebx + 0x2c]
sub eax, esi
push eax
lea eax, [ecx + esi]
push eax
push ecx
call fcn.00439500
add esp, 0xc
sub dword [ebx + 0x30], esi
mov eax, dword [ebp - 0x1c]
mov cl, byte [eax]
mov eax, 1
and cl, 0xf
cmp cl, 8
jne 0x42167f
or dword [ebx + 0x7c], 0x400
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004381bc
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004381bc
mov esp, ebp
pop ebp
ret