Function at 0x1007ed70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x324
push ebx
mov ebx, ecx
mov ecx, dword [ebx + 0x409b0]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x30], ebx
xor edi, edi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x14], esi
call edx
mov ebp, dword [esp + 0x33c]
add ebp, 3
and ebp, 0xfffffffc
mov dword [esp + 0x10], eax
mov dword [esp + 0x33c], ebp
jle 0x1007ede8
mov ecx, dword [ebx + 0x409b0]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
call edx
mov cl, al
and cl, 0xf
mov byte [esp + esi + 0x34], cl
cmp cl, 0xc
ja 0x1007eeea
shr al, 4
mov byte [esp + esi + 0x35], al
cmp al, 0xc
ja 0x1007eeea
add esi, 2
cmp esi, ebp
jl 0x1007edb3
mov eax, ebp
and al, 7
cmp al, 4
jne 0x1007ee23
mov ecx, dword [ebx + 0x409b0]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebx + 0x409b0]
shl eax, 8
cdq
mov esi, edx
mov edx, dword [ecx]
mov edi, eax
mov eax, dword [edx + 0x14]
call eax
cdq
add edi, eax
adc esi, edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x10], 0
test ebp, ebp
jle 0x1007eedb
mov ecx, dword [esp + 0x10]
movzx ebp, byte [esp + ecx + 0x34]
cmp dword [esp + 0x14], ebp
jge 0x1007ee73
xor esi, esi
mov ecx, dword [ebx + 0x409b0]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov ecx, esi
xor ecx, 8
add ecx, dword [esp + 0x14]
cdq
call fcn.10154180
add edi, eax
adc dword [esp + 0x2c], edx
add esi, 8
cmp esi, 0x20
jl 0x1007ee44
add dword [esp + 0x14], 0x20
mov edx, dword [esp + 0x2c]
mov ecx, 0x10
sub ecx, ebp
mov esi, 0xffff
sar esi, cl
mov eax, edi
mov ecx, ebp
and esi, edi
call fcn.101541a0
sub dword [esp + 0x14], ebp
mov dword [esp + 0x2c], edx
lea ecx, [ebp - 1]
mov edx, 1
shl edx, cl
mov edi, eax
test esi, edx
jne 0x1007eeba
mov ecx, ebp
mov eax, 1
shl eax, cl
mov ecx, 1
sub ecx, eax
add esi, ecx
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x338]
mov word [edx + eax*2], si
inc eax
cmp eax, dword [esp + 0x33c]
mov dword [esp + 0x10], eax
jl 0x1007ee33
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x324
ret 8
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x409b0]
mov esi, dword [ecx]
cdq
push 0
push edx
push eax
mov eax, dword [esi + 0xc]
call eax
mov esi, dword [esp + 0x338]
lea eax, [ebp - 1]
shr eax, 3
add esi, 4
inc eax
mov dword [esp + 0x10], eax
jmp 0x1007ef24
mov ebx, dword [esp + 0x30]
mov ecx, dword [ebx + 0x409b0]
mov edx, dword [ecx]
mov edx, dword [edx + 8]
push 6
push 2
lea eax, [esp + 0x20]
push eax
call edx
cmp eax, 6
jge 0x1007ef46
mov ecx, ebx
call fcn.10071940
push 0x1234
call dword [sym.imp.WS2_32.dll_ntohs]
xor edx, edx
mov ecx, 0x1234
cmp ax, cx
sete dl
xor ecx, ecx
mov eax, 0x4949
cmp word [ebx + 0x40a00], ax
sete cl
cmp ecx, edx
jne 0x1007ef85
lea edx, [esp + 0x18]
push 0xc
push edx
mov eax, edx
push eax
call fcn.1016f53e
add esp, 0xc
mov eax, dword [esp + 0x18]
mov di, ax
shr di, 4
mov ecx, 0xffffff00
and di, cx
mov ecx, dword [esp + 0x1c]
mov dx, cx
shr dx, 8
and dx, 0xfff0
or di, dx
mov edx, dword [esp + 0x20]
mov bx, dx
shr bx, 0xc
or di, bx
mov word [esi - 4], di
mov edi, dword [esp + 0x1a]
mov bx, di
shr bx, 4
mov ebp, 0xffffff00
and bx, bp
mov bp, word [esp + 0x1e]
shr bp, 8
and bp, 0xfff0
or bx, bp
mov bp, word [esp + 0x22]
and eax, 0xfff
shr bp, 0xc
or bx, bp
mov word [esi - 2], bx
mov word [esi], ax
mov eax, dword [esp + 0x1e]
and eax, 0xfff
mov word [esi + 6], ax
mov eax, dword [esp + 0x22]
and eax, 0xfff
and edi, 0xfff
and ecx, 0xfff
and edx, 0xfff
mov word [esi + 0xa], ax
mov word [esi + 2], di
mov word [esi + 4], cx
mov word [esi + 8], dx
mov eax, 1
add esi, 0x10
sub dword [esp + 0x10], eax
jne 0x1007ef20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x324
ret 8