Function at 0x488670
Capabilities:
Encode data using xor
Encrypt data using tea
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4c0f30
push eax
mov eax, dword [esp + 0x14]
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push ebp
lea ebp, [eax + 0xa]
push esi
mov ebx, ebp
push edi
and ebx, reloc.WSOCK32.dll_getsockopt
jns 0x4886a2
dec ebx
or ebx, 0xfffffff8
inc ebx
je 0x4886ad
mov ecx, 8
sub ecx, ebx
mov ebx, ecx
mov edi, dword [sym.imp.MSVCRT.dll_rand]
call edi
and al, 0xf8
mov edx, ebx
or al, bl
dec ebx
test edx, edx
mov byte [esp + 0x18], al
mov dword [esp + 0x10], 1
je 0x4886e4
lea esi, [ebx + 1]
call edi
mov ecx, dword [esp + 0x10]
mov byte [esp + ecx + 0x18], al
inc ecx
dec esi
dec ebx
test esi, esi
mov dword [esp + 0x10], ecx
ja 0x4886cf
mov ecx, dword [esp + 0x8c]
mov edx, dword [esp + 0x80]
xor eax, eax
push edx
mov dword [esp + 0x24], eax
lea edi, [esp + 0x24]
mov dword [esp + 0x28], eax
mov dword [ecx], eax
call sub.WSOCK32.dll_htonl
mov esi, eax
call sub.MFC42.DLL_AfxGetAppModuleState
mov ecx, dword [eax + 4]
xor eax, eax
lea edx, [esp + 0x48]
push 5
mov al, byte [ecx + 0xce]
push edx
mov byte [esp + 0x50], al
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x55], esi
call fcn.00489d4a
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x56]
push ebx
push ecx
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x90], esp
push 0x4c7fc0
call sub.MFC42.DLL_CString::CString_5
push ecx
mov dword [esp + 0x84], 0
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x4c7fc0
call sub.MFC42.DLL_CString::CString_5
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x3c]
push eax
push ecx
push ebp
mov dword [esp + 0x90], 0xffffffff
call fcn.0047dbc0
add esp, 0x20
call sub.MFC42.DLL_AfxGetAppModuleState
mov edx, dword [eax + 4]
lea ecx, [esp + 0x4b]
push 5
push ecx
mov al, byte [edx + 0xcf]
lea edx, [esp + 0x30]
push edx
mov byte [esp + 0x57], al
mov dword [esp + 0x58], esi
call fcn.00489d4a
mov ebp, dword [esp + 0x90]
lea esi, [esp + 0x62]
lea ecx, [esp + 0x34]
add esp, 0xc
xor eax, eax
sub esi, ebp
sub ebp, ecx
lea ecx, [esp + eax + 0x28]
lea edx, [ecx + ebp]
mov bl, byte [edx + esi]
xor bl, byte [edx]
mov dl, byte [ecx]
xor dl, bl
inc eax
cmp eax, 0x10
mov byte [ecx], dl
jb 0x4887ce
mov ebx, dword [esp + 0x88]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x20]
mov dword [esp + 0x80], 1
sub eax, ebx
mov dword [esp + 0x88], eax
cmp ecx, 8
jge 0x488833
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [esp + 0x10]
mov byte [esp + ecx + 0x18], al
mov eax, dword [esp + 0x80]
inc ecx
inc eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x80], eax
cmp ecx, 8
jne 0x48894c
lea edx, [esp + 0x18]
xor esi, esi
sub edi, edx
mov dl, byte [esp + esi + 0x18]
lea eax, [esp + esi + 0x18]
mov cl, byte [edi + eax]
xor dl, cl
inc esi
cmp esi, 8
mov byte [eax], dl
jl 0x488841
mov edx, dword [esp + 0x18]
push edx
call sub.WSOCK32.dll_ntohl
mov esi, eax
mov eax, dword [esp + 0x1c]
push eax
call sub.WSOCK32.dll_ntohl
mov edi, eax
xor ebp, ebp
mov ecx, dword [esp + ebp + 0x28]
push ecx
call sub.WSOCK32.dll_ntohl
mov dword [esp + ebp + 0x38], eax
add ebp, 4
cmp ebp, 0x10
jl 0x488870
xor eax, eax
mov dword [esp + 0x84], 0xd
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x38]
mov edx, edi
sub eax, 0x61c88647
shr edx, 5
add edx, ecx
mov ecx, edi
shl ecx, 4
add ecx, ebp
mov ebp, dword [esp + 0x40]
xor edx, ecx
lea ecx, [eax + edi]
xor edx, ecx
mov ecx, dword [esp + 0x44]
add esi, edx
mov edx, esi
shr edx, 5
add edx, ecx
mov ecx, esi
shl ecx, 4
add ecx, ebp
xor edx, ecx
lea ecx, [eax + esi]
xor edx, ecx
mov ecx, dword [esp + 0x84]
add edi, edx
dec ecx
mov dword [esp + 0x84], ecx
jne 0x488893
push esi
call sub.WSOCK32.dll_htonl
push edi
mov dword [ebx], eax
call sub.WSOCK32.dll_htonl
mov esi, dword [esp + 0x88]
mov dword [ebx + 4], eax
mov eax, ebx
mov dword [esp + 0x84], esi
mov edi, 8
mov dl, byte [esi + eax]
mov cl, byte [eax]
xor cl, dl
mov byte [eax], cl
inc eax
dec edi
jne 0x48890d
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x8c]
mov edi, ebx
mov dword [esp + 0x20], ecx
mov ebx, dword [edx]
xor ecx, ecx
add ebx, 8
sub esi, 8
mov dword [edx], ebx
mov dword [esp + 0x10], ecx
mov ebx, eax
mov dword [esp + 0x88], esi
cmp dword [esp + 0x80], 2
jle 0x488809
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x488abd
lea eax, [esp + 0x20]
sub eax, ebx
mov dword [esp + 0x84], eax
cmp ecx, 8
jge 0x488998
mov esi, dword [esp + 0x78]
inc ecx
mov dword [esp + 0x10], ecx
mov al, byte [esi]
inc esi
mov byte [esp + ecx + 0x17], al
mov eax, dword [esp + 0x7c]
dec eax
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], eax
cmp ecx, 8
jne 0x488ab1
lea ecx, [esp + 0x18]
xor esi, esi
sub edi, ecx
mov cl, byte [esp + esi + 0x18]
lea eax, [esp + esi + 0x18]
mov dl, byte [edi + eax]
xor cl, dl
inc esi
cmp esi, 8
mov byte [eax], cl
jl 0x4889a6
mov eax, dword [esp + 0x18]
push eax
call sub.WSOCK32.dll_ntohl
mov ecx, dword [esp + 0x1c]
mov esi, eax
push ecx
call sub.WSOCK32.dll_ntohl
mov edi, eax
xor ebp, ebp
mov edx, dword [esp + ebp + 0x28]
push edx
call sub.WSOCK32.dll_ntohl
mov dword [esp + ebp + 0x38], eax
add ebp, 4
cmp ebp, 0x10
jl 0x4889d5
xor eax, eax
mov dword [esp + 0x80], 0xd
mov edx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x38]
mov ecx, edi
sub eax, 0x61c88647
shr ecx, 5
add ecx, edx
mov edx, edi
shl edx, 4
add edx, ebp
mov ebp, dword [esp + 0x40]
xor ecx, edx
lea edx, [eax + edi]
xor ecx, edx
mov edx, dword [esp + 0x44]
add esi, ecx
mov ecx, esi
shr ecx, 5
add ecx, edx
mov edx, esi
shl edx, 4
add edx, ebp
xor ecx, edx
lea edx, [eax + esi]
xor ecx, edx
add edi, ecx
mov ecx, dword [esp + 0x80]
dec ecx
mov dword [esp + 0x80], ecx
jne 0x4889f8
push esi
call sub.WSOCK32.dll_htonl
push edi
mov dword [ebx], eax
call sub.WSOCK32.dll_htonl
mov esi, dword [esp + 0x84]
mov dword [ebx + 4], eax
mov eax, ebx
mov dword [esp + 0x84], esi
mov edi, 8
mov cl, byte [esi + eax]
mov dl, byte [eax]
xor dl, cl
mov byte [eax], dl
inc eax
dec edi
jne 0x488a72
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x8c]
mov edi, ebx
mov dword [esp + 0x24], ecx
mov ebx, dword [edx]
xor ecx, ecx
add ebx, 8
sub esi, 8
mov dword [edx], ebx
mov dword [esp + 0x10], ecx
mov ebx, eax
mov dword [esp + 0x84], esi
mov eax, dword [esp + 0x7c]
test eax, eax
jne 0x488973
lea eax, [esp + 0x20]
mov dword [esp + 0x80], 1
sub eax, ebx
mov dword [esp + 0x78], eax
cmp ecx, 8
jge 0x488af3
mov eax, dword [esp + 0x80]
mov byte [esp + ecx + 0x18], 0
inc ecx
inc eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x80], eax
cmp ecx, 8
jne 0x488bfd
lea edx, [esp + 0x18]
xor esi, esi
sub edi, edx
mov dl, byte [esp + esi + 0x18]
lea eax, [esp + esi + 0x18]
mov cl, byte [edi + eax]
xor dl, cl
inc esi
cmp esi, 8
mov byte [eax], dl
jl 0x488b01
mov edx, dword [esp + 0x18]
push edx
call sub.WSOCK32.dll_ntohl
mov esi, eax
mov eax, dword [esp + 0x1c]
push eax
call sub.WSOCK32.dll_ntohl
mov edi, eax
xor ebp, ebp
mov ecx, dword [esp + ebp + 0x28]
push ecx
call sub.WSOCK32.dll_ntohl
mov dword [esp + ebp + 0x38], eax
add ebp, 4
cmp ebp, 0x10
jl 0x488b30
xor eax, eax
mov dword [esp + 0x7c], 0xd
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x38]
mov edx, edi
sub eax, 0x61c88647
shr edx, 5
add edx, ecx
mov ecx, edi
shl ecx, 4
add ecx, ebp
mov ebp, dword [esp + 0x40]
xor edx, ecx
lea ecx, [eax + edi]
xor edx, ecx
mov ecx, dword [esp + 0x44]
add esi, edx
mov edx, esi
shr edx, 5
add edx, ecx
mov ecx, esi
shl ecx, 4
add ecx, ebp
xor edx, ecx
lea ecx, [eax + esi]
xor edx, ecx
mov ecx, dword [esp + 0x7c]
add edi, edx
dec ecx
mov dword [esp + 0x7c], ecx
jne 0x488b50
push esi
call sub.WSOCK32.dll_htonl
push edi
mov dword [ebx], eax
call sub.WSOCK32.dll_htonl
mov esi, dword [esp + 0x78]
mov dword [ebx + 4], eax
mov eax, ebx
mov dword [esp + 0x84], esi
mov edi, 8
mov dl, byte [esi + eax]
mov cl, byte [eax]
xor cl, dl
mov byte [eax], cl
inc eax
dec edi
jne 0x488bc1
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x8c]
mov edi, ebx
mov dword [esp + 0x20], ecx
mov ebx, dword [edx]
xor ecx, ecx
add ebx, 8
sub esi, 8
mov dword [edx], ebx
mov dword [esp + 0x10], ecx
mov ebx, eax
mov dword [esp + 0x78], esi
cmp dword [esp + 0x80], 7
jle 0x488ad2
mov ecx, dword [esp + 0x68]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x64
ret