Function at 0x40e330
Capabilities:
Encode data using xor
Print debug messages

Disassembly:
sub esp, 0xcf8
lea eax, [esp]
push ebx
push esi
push edi
push eax
call fcn.00414940
mov eax, dword [0x42944c]
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x40e8c7
mov ecx, dword [0x429450]
cmp ecx, ebx
je 0x40e8c7
cmp dword [0x429430], ebx
jg 0x40e8c7
mov eax, dword [esp + 0xd08]
cmp eax, ebx
jne 0x40e422
mov eax, dword [0x4229c8]
cmp eax, ebx
je 0x40e8c7
dec eax
mov dword [0x4229c8], eax
jne 0x40e8c7
cmp ecx, 1
jne 0x40e692
mov eax, dword [0x429490]
lea edx, [esp + 0x38]
push 8
push edx
push eax
mov dword [0x4229c8], 4
mov byte [esp + 0x44], 7
mov byte [esp + 0x45], cl
mov word [esp + 0x46], 8
mov byte [esp + 0x48], cl
mov byte [esp + 0x49], bl
mov byte [esp + 0x4a], bl
mov byte [esp + 0x4b], bl
call fcn.0040af50
mov eax, dword [0x429490]
add esp, 0xc
cmp eax, 0x1010101
jne 0x40e408
mov ecx, dword [esp + 0x3a]
lea edx, [esp + 0x38]
and ecx, 0xffff
push ecx
push edx
push 0x10101ca
call fcn.0040af50
add esp, 0xc
push ebx
push 1
push str.send_code1
call fcn.00409af0
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0xcf8
ret
cmp eax, 1
jne 0x40e397
cmp ecx, eax
mov eax, dword [0x4244dc]
jne 0x40e493
cmp eax, 0x10
jb 0x40e493
cmp byte [0x423e98], 7
jne 0x40e8c7
cmp byte [0x423e9c], 2
jne 0x40e8c7
push ebx
push ebx
push str.rec_code2_ok
call fcn.00409af0
mov ecx, dword [0x423ea4]
mov edx, dword [0x423ea0]
add esp, 0xc
mov dword [0x422f44], ecx
mov dword [0x422f48], edx
mov dword [0x429450], 2
mov dword [0x4229c4], 4
jmp 0x40e69b
mov edx, dword [0x423ea0]
mov esi, dword [0x429588]
cmp esi, edx
je 0x40e4a9
mov dword [0x429588], edx
cmp ecx, 2
jne 0x40e8c7
cmp eax, 0x10
jb 0x40e8c7
mov cx, word [0x423e9e]
cmp cx, 0x314
ja 0x40e8c7
xor esi, esi
mov si, cx
add esi, 0x10
cmp eax, esi
jl 0x40e8c7
cmp byte [0x423e98], 7
jne 0x40e8c7
mov al, byte [0x423e9c]
and al, 0xf
cmp al, 4
jne 0x40e8c7
mov eax, dword [0x422f40]
mov ecx, eax
shl ecx, 0x1e
shr eax, 2
add ecx, eax
cmp ecx, edx
jne 0x40e8c7
push ebx
push ebx
push str.rec_code4_ok
call fcn.00409af0
mov ecx, dword [0x423e9c]
add esp, 0xc
test cl, 0x40
mov dword [0x429450], 1
mov dword [0x4229c8], 0x24
je 0x40e5db
mov edi, 0x423ea8
or ecx, 0xffffffff
xor eax, eax
push 0x30
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [0x4229c8], ebx
push 0x2d
je 0x40e574
call fcn.004047d0
mov edx, dword [0x428cd4]
add esp, 4
push eax
push 0x423ea8
push edx
jmp 0x40e58e
call fcn.004047d0
add esp, 4
push eax
push 0x1c
call fcn.004047d0
add esp, 4
push eax
mov eax, dword [0x428cd4]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edi, 0x423ea8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edx, ecx
or ecx, 0xffffffff
add edx, 0x423ea9
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40e5c0
push edx
call fcn.00406820
add esp, 4
mov ecx, dword [0x428cd4]
push ebx
push ebx
push 2
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
pop ebx
add esp, 0xcf8
ret
cmp dword [0x41e160], ebx
je 0x40e626
mov eax, dword [0x41e15c]
and ecx, 0xff
and eax, 0x80
push ecx
or eax, ecx
lea edx, [esp + 0x83c]
push eax
push str.pppoeproxyactv_d__tmp2133retPheadptr__type_d
push edx
mov dword [0x41e15c], eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [esp + 0x838]
push eax
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov ecx, dword [0x423e9c]
test cl, 0x80
je 0x40e638
cmp dword [0x429524], ebx
jne 0x40e638
call fcn.0040e9c0
cmp dword [0x41e178], ebx
jne 0x40e8c7
push 3
call fcn.0040f0b0
mov eax, dword [0x41e160]
add esp, 4
cmp eax, ebx
je 0x40e666
test byte [0x41e15c], 0x80
je 0x40e666
mov dword [0x429454], ebx
mov eax, dword [0x422f40]
pop edi
mov ecx, eax
pop esi
shr ecx, 0x10
xor ecx, eax
mov dword [0x41e178], 1
mov dword [0x428355], eax
mov word [0x423e94], cx
pop ebx
add esp, 0xcf8
ret
cmp ecx, 2
jne 0x40e8c7
mov eax, dword [0x4229c4]
mov dword [0x4229c8], 4
dec eax
mov dword [0x4229c4], eax
jne 0x40e6c6
pop edi
pop esi
mov dword [0x429450], 1
pop ebx
add esp, 0xcf8
ret
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0xc], bl
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0xc]
mov byte [esp + 0x3d], cl
mov ecx, dword [esp + 0x3d]
and ecx, 0xff
lea edi, [esp + 0x58]
mov eax, ecx
mov byte [esp + 0x38], 7
shr ecx, 2
mov byte [esp + 0x39], bl
mov byte [esp + 0x3c], 3
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 9
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x41]
mov esi, 0x4229d0
and ecx, 0xff
lea edi, [esp + ecx + 0x5c]
mov ecx, 0x10
rep movsd dword es:[edi], dword [esi]
movzx dx, byte [esp + 0x41]
mov ecx, dword [0x422f44]
add edx, 0x60
mov word [esp + 0x3e], dx
mov edx, dword [0x422f48]
mov dword [esp + 0x42], eax
mov dword [esp + 0x48], ecx
mov word [esp + 0x46], ax
mov dword [esp + 0x4c], 0x200
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], 0x1312fc7
mov dword [esp + 0x58], 0x7e
call fcn.0040f0b0
add esp, 4
test al, al
je 0x40e782
mov eax, dword [esp + 0x48]
or ah, 0x62
mov dword [esp + 0x48], eax
cmp dword [0x429550], ebx
je 0x40e795
mov eax, dword [esp + 0x48]
or ah, 0x80
mov dword [esp + 0x48], eax
mov eax, dword [0x41e178]
cmp eax, ebx
mov eax, dword [0x429454]
je 0x40e7b2
cmp eax, ebx
je 0x40e7b6
mov ecx, dword [esp + 0x48]
or ch, 1
mov dword [esp + 0x48], ecx
cmp eax, ebx
jne 0x40e7c0
mov dword [0x429454], 1
mov eax, dword [esp + 0x3a]
and eax, 0xffff
lea ecx, [esp + eax + 0x38]
mov dword [ecx], ebx
mov eax, dword [esp + 0x3a]
and eax, 0xffff
add eax, 3
cdq
and edx, 3
add eax, edx
sar eax, 2
shl eax, 2
mov word [esp + 0x3a], ax
mov ecx, dword [esp + 0x3a]
and ecx, 0xffff
xor eax, eax
shr ecx, 2
cmp ecx, ebx
jle 0x40e80d
lea edx, [esp + 0x38]
mov esi, dword [edx]
add edx, 4
xor eax, esi
dec ecx
jne 0x40e803
imul eax, eax, 0x12c4b7e
mov esi, dword [sym.imp.MSVCRT.dll_clock]
mov dword [esp + 0x50], eax
mov eax, dword [0x429584]
mov dword [esp + 0x54], ebx
cmp eax, ebx
jne 0x40e831
call esi
mov dword [0x429584], eax
call esi
mov esi, dword [0x429584]
mov ecx, dword [esp + 0x50]
mov edx, eax
sub edx, esi
cmp edx, 0x1388
jge 0x40e857
cmp dword [0x429588], ecx
je 0x40e857
mov dword [0x41e178], ebx
mov dword [0x429584], eax
mov eax, dword [0x41e178]
cmp eax, ebx
jne 0x40e86b
mov dword [0x422f40], ecx
xor esi, esi
mov eax, dword [esp + 0x3d]
mov edx, esi
and eax, 0xff
and edx, 7
add eax, esi
mov cl, 8
sub cl, dl
lea edi, [esp + eax + 0x58]
mov al, byte [esp + eax + 0x58]
mov bl, al
shr bl, cl
mov ecx, edx
shl al, cl
add bl, al
inc esi
cmp esi, 0x40
mov byte [edi], bl
jb 0x40e86d
mov ecx, dword [esp + 0x3a]
mov eax, dword [0x429490]
and ecx, 0xffff
lea edx, [esp + 0x38]
push ecx
push edx
push eax
call fcn.0040af50
push 0
push 0
push str.send_code3
call fcn.00409af0
add esp, 0x18
pop edi
pop esi
pop ebx
add esp, 0xcf8
ret