Function at 0x487fc4
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x4cd734
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x4c
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
add eax, 0xa
push 8
cdq
pop ecx
idiv ecx
mov ebx, edx
test ebx, ebx
je 0x487fef
push ecx
pop eax
sub eax, ebx
mov dword [ebp - 0x18], eax
mov ebx, eax
mov esi, dword [sym.imp.MSVCRT.dll_rand]
call esi
and al, 0xf8
mov dword [ebp - 0x10], 1
or al, bl
mov byte [ebp - 0x20], al
mov eax, ebx
dec ebx
test eax, eax
mov dword [ebp - 0x18], ebx
je 0x488027
lea edi, [ebx + 1]
call esi
mov ecx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
dec edi
dec ebx
test edi, edi
mov byte [ebp + ecx - 0x20], al
ja 0x488012
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp + 0x1c]
push dword [ebp + 0x10]
xor eax, eax
lea edi, [ebp - 0x28]
and dword [ebx], 0
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x14], eax
call sub.WS2_32.dll_htonl
mov edi, eax
call sub.MFC42.DLL_AfxGetAppModuleState
mov eax, dword [eax + 4]
push 5
movzx eax, byte [eax + 0xce]
mov byte [ebp - 0x58], al
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 0x57], edi
call fcn.0041cca3
add esp, 0xc
lea eax, [ebp - 0x10]
mov esi, 0x4d5034
push dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x4a]
push eax
push ecx
mov ecx, esp
mov dword [ebp + 0x1c], esp
push esi
call sub.MFC42.DLL_CString::CString_1
and dword [ebp - 4], 0
push ecx
mov ecx, esp
mov dword [ebp + 0x10], esp
push esi
call sub.MFC42.DLL_CString::CString_1
push dword [ebp - 0x20]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp + 0xc]
add eax, 0xa
push eax
call fcn.004872f7
add esp, 0x20
call sub.MFC42.DLL_AfxGetAppModuleState
mov eax, dword [eax + 4]
push 5
mov al, byte [eax + 0xcf]
mov dword [ebp - 0x54], edi
mov byte [ebp - 0x55], al
lea eax, [ebp - 0x55]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.0041cca3
mov ecx, dword [ebp + 0x14]
and dword [ebp + 0x1c], 0
lea eax, [ebp - 0x4a]
lea edx, [ebp - 0x38]
add esp, 0xc
sub eax, ecx
sub ecx, edx
mov edx, dword [ebp + 0x1c]
lea esi, [ebp + edx - 0x38]
lea edi, [ecx + esi]
mov dl, byte [edi + eax]
xor dl, byte [edi]
xor byte [esi], dl
inc dword [ebp + 0x1c]
cmp dword [ebp + 0x1c], 0x10
jb 0x4880e8
lea esi, [ebp - 0x28]
mov dword [ebp + 0x1c], 1
sub esi, dword [ebp + 0x18]
mov dword [ebp + 0x10], esi
cmp dword [ebp - 0x10], 8
jge 0x48812f
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
inc dword [ebp + 0x1c]
cmp dword [ebp - 0x10], 8
mov byte [ebp + ecx - 0x20], al
jne 0x48818e
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x20]
xor edi, edi
sub ecx, eax
lea eax, [ebp + edi - 0x20]
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc edi
cmp edi, 8
jl 0x48813b
push dword [ebp + 0x18]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.004882cf
mov eax, dword [ebp + 0x18]
add esp, 0xc
mov dword [ebp + 0x14], esi
push 8
pop edi
mov cl, byte [esi + eax]
xor byte [eax], cl
inc eax
dec edi
jne 0x488166
and dword [ebp - 0x10], 0
mov ecx, dword [ebp + 0x18]
add dword [ebx], 8
lea esi, [ebp - 0x20]
lea edi, [ebp - 0x28]
sub dword [ebp + 0x10], 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x14], ecx
mov dword [ebp + 0x18], eax
cmp dword [ebp + 0x1c], 2
jle 0x488112
cmp dword [ebp + 0xc], 0
je 0x488233
lea esi, [ebp - 0x28]
sub esi, dword [ebp + 0x18]
mov dword [ebp + 0x1c], esi
cmp dword [ebp - 0x10], 8
jge 0x4881ca
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
inc dword [ebp + 8]
mov al, byte [eax]
dec dword [ebp + 0xc]
cmp dword [ebp - 0x10], 8
mov byte [ebp + ecx - 0x20], al
jne 0x488229
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x20]
xor edi, edi
sub ecx, eax
lea eax, [ebp + edi - 0x20]
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc edi
cmp edi, 8
jl 0x4881d6
push dword [ebp + 0x18]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.004882cf
mov eax, dword [ebp + 0x18]
add esp, 0xc
mov dword [ebp + 0x14], esi
push 8
pop edi
mov cl, byte [esi + eax]
xor byte [eax], cl
inc eax
dec edi
jne 0x488201
and dword [ebp - 0x10], 0
mov ecx, dword [ebp + 0x18]
add dword [ebx], 8
lea esi, [ebp - 0x20]
lea edi, [ebp - 0x28]
sub dword [ebp + 0x1c], 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x14], ecx
mov dword [ebp + 0x18], eax
cmp dword [ebp + 0xc], 0
jne 0x4881ab
lea esi, [ebp - 0x28]
mov dword [ebp + 0x1c], 1
sub esi, dword [ebp + 0x18]
mov dword [ebp + 0xc], esi
cmp dword [ebp - 0x10], 8
jge 0x48825b
mov eax, dword [ebp - 0x10]
and byte [ebp + eax - 0x20], 0
inc dword [ebp - 0x10]
inc dword [ebp + 0x1c]
cmp dword [ebp - 0x10], 8
jne 0x4882ba
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x20]
xor edi, edi
sub ecx, eax
lea eax, [ebp + edi - 0x20]
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc edi
cmp edi, 8
jl 0x488267
push dword [ebp + 0x18]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.004882cf
mov eax, dword [ebp + 0x18]
add esp, 0xc
mov dword [ebp + 0x14], esi
push 8
pop edi
mov cl, byte [esi + eax]
xor byte [eax], cl
inc eax
dec edi
jne 0x488292
and dword [ebp - 0x10], 0
add dword [ebx], 8
mov ecx, dword [ebp + 0x18]
sub dword [ebp + 0xc], 8
lea esi, [ebp - 0x20]
lea edi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [ebp + 0x18], eax
cmp dword [ebp + 0x1c], 7
jle 0x488243
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret