Function at 0x499700
Capabilities:
Get hostname
Get session user name
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff254
push ebx
push esi
push edi
mov byte [ebp - 0x3d], dl
mov dword [ebp - 0x3c], eax
mov eax, 0x4dd950
call fcn.0049df88
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx + 0x2f8]
call fcn.004634f8
test eax, eax
jne 0x49973f
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
mov eax, edx
jmp 0x499c70
xor ecx, ecx
mov dword [ebp - 0x44], ecx
jmp 0x499bf4
mov word [ebp - 0x28], 8
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax + 0x2f8]
mov eax, dword [edx + 0x22c]
call fcn.0045fe24
push eax
push dword [ebp - 0x44]
mov edx, dword [ebp - 0x3c]
add edx, 0x748
push edx
push 0x4dd300
mov ecx, dword [ebp - 0x3c]
add ecx, 0x348
push ecx
call fcn.0040d5c4
add esp, 0x14
mov edx, eax
lea eax, [ebp - 4]
call fcn.004ad754
inc dword [ebp - 0x1c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x344]
call fcn.0045a774
dec dword [ebp - 0x1c]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004ad880
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0x2f8]
mov eax, dword [eax + 0x22c]
mov edx, dword [ebp - 0x44]
call fcn.0045fe54
mov dword [ebp - 0x48], eax
mov edx, 3
mov eax, dword [ebp - 0x48]
call fcn.0045f948
test al, al
je 0x499bf1
mov cl, byte [ebp - 0x3d]
test cl, cl
je 0x4997fa
mov eax, dword [ebp - 0x48]
mov edx, dword [eax + 0x10]
cmp edx, 4
je 0x499bf1
mov esi, 0x4da340
lea edi, [ebp - 0x7a4]
mov ecx, 0x1ce
rep movsd dword es:[edi], dword [esi]
mov al, byte [ebp - 0x3d]
test al, al
je 0x49981f
mov dword [ebp - 0x7a4], 0xd
jmp 0x499829
mov dword [ebp - 0x7a4], 0xe
push 0x103
lea edx, [ebp - 0x69c]
push edx
call sub.WSOCK32.DLL_gethostname
lea ecx, [ebp - 0x7a0]
push ecx
call fcn.0040cf50
pop ecx
lea eax, [ebp - 0x494]
push eax
call fcn.0040dcb4
pop ecx
push 0x4dd317
lea edx, [ebp - 0x188]
push edx
call fcn.0049dac8
add esp, 8
mov dword [ebp - 0x4c], 0x103
push dword [ebp - 0x4c]
lea ecx, [ebp - 0x598]
push ecx
push 0x4dd354
push 0x4dd31e
call fcn.0049aa34
add esp, 0x10
lea eax, [ebp - 0x598]
push eax
call fcn.0049daf8
pop ecx
test eax, eax
jne 0x4998ac
lea edx, [ebp - 0x4c]
push edx
lea ecx, [ebp - 0x598]
push ecx
call sub.ADVAPI32.DLL_GetUserNameA
mov eax, dword [sym.terminal.exe__MainForm]
mov edx, dword [eax]
add edx, 0xf94
push edx
lea ecx, [ebp - 0x390]
push ecx
call fcn.0049dac8
add esp, 8
mov eax, dword [sym.terminal.exe__MainForm]
mov edx, dword [eax]
add edx, 0xd7d
push edx
lea ecx, [ebp - 0x28c]
push ecx
call fcn.0049dac8
add esp, 8
mov esi, 0x4daa78
lea edi, [ebp - 0x8a8]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x3c]
add eax, 0x748
push eax
push 0x4dd364
lea edx, [ebp - 0x8a8]
push edx
call fcn.0040d5c4
add esp, 0xc
mov esi, 0x4dab7c
lea edi, [ebp - 0x9ac]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x9ac]
push eax
mov edx, dword [sym.terminal.exe__MainForm]
push dword [edx]
call fcn.00404c80
add esp, 8
push 0x738
lea ecx, [ebp - 0x7a4]
push ecx
mov eax, dword [sym.terminal.exe__MainForm]
push dword [eax]
call fcn.00404bf4
pop ecx
push eax
lea edx, [ebp - 0x9ac]
push edx
call fcn.0040bfc8
add esp, 0x10
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
test ecx, ecx
jg 0x4999af
push 0x40
lea eax, [ebp - 0x8a8]
push eax
mov edx, dword [ebp - 0x3c]
add edx, 0x748
push edx
push 0x4dd371
mov ecx, dword [ebp - 0x3c]
add ecx, 0x348
push ecx
call fcn.0040d5c4
add esp, 0xc
push eax
mov eax, dword [ebp - 0x3c]
call fcn.0044a5e4
push eax
call sub.USER32.DLL_MessageBoxA
jmp 0x499bf1
mov esi, 0x4dac80
lea edi, [ebp - 0xdac]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
mov al, byte [ebp - 0x3d]
test al, al
je 0x4999d4
mov dword [ebp - 0xdac], 0x1714
jmp 0x4999de
mov dword [ebp - 0xdac], 0x1715
mov dword [ebp - 0xda8], 0xffffffff
mov word [ebp - 0x28], 0x20
mov edx, dword [ebp - 0x48]
add edx, 8
mov dword [ebp - 0x58], edx
mov ecx, dword [ebp - 0x48]
add ecx, 8
mov dword [ebp - 0x5c], ecx
mov eax, dword [ebp - 0x5c]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x14]
mov edx, eax
dec edx
xor eax, eax
mov dword [ebp - 8], eax
lea ecx, [ebp - 8]
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x58]
mov eax, dword [eax]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 8]
test eax, eax
je 0x499a2e
mov edx, dword [ebp - 8]
jmp 0x499a33
mov edx, 0x4dd382
mov dword [ebp - 0x60], edx
push dword [ebp - 0x60]
call fcn.004a5d58
pop ecx
mov dword [ebp - 0x54], eax
dec dword [ebp - 0x1c]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004ad880
mov word [ebp - 0x28], 0x14
push 4
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0xda4]
push ecx
call fcn.0049d8d8
add esp, 0xc
push 0
push 0x400
lea eax, [ebp - 0xdac]
push eax
push dword [ebp - 0x50]
call sub.WSOCK32.DLL_send
push 0x1388
push 0x4dd383
push dword [ebp - 0x50]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jge 0x499ae1
push dword [ebp - 0x50]
call sub.WSOCK32.DLL_closesocket
push 0x40
lea edx, [ebp - 0x8a8]
push edx
mov ecx, dword [ebp - 0x3c]
add ecx, 0x748
push ecx
push 0x4dd385
mov eax, dword [ebp - 0x3c]
add eax, 0x348
push eax
call fcn.0040d5c4
add esp, 0xc
push eax
mov eax, dword [ebp - 0x3c]
call fcn.0044a5e4
push eax
call sub.USER32.DLL_MessageBoxA
jmp 0x499bf1
xor edx, edx
mov dword [ebp - 0x64], edx
push 0
push 4
lea ecx, [ebp - 0x64]
push ecx
push dword [ebp - 0x50]
call sub.WSOCK32.DLL_recv
mov eax, dword [ebp - 0x64]
test eax, eax
jg 0x499b0a
push dword [ebp - 0x50]
call sub.WSOCK32.DLL_closesocket
jmp 0x499bf1
mov dl, byte [ebp - 0x3d]
test dl, dl
je 0x499b7f
mov ecx, 4
xor edx, edx
mov eax, dword [ebp - 0x48]
call fcn.0045fa20
mov ecx, dword [ebp - 0x48]
add ecx, 8
mov dword [ebp - 0x68], ecx
mov word [ebp - 0x28], 0x2c
mov eax, dword [ebp - 0x3c]
add eax, 0x748
push eax
push 0x4dd399
mov edx, dword [ebp - 0x3c]
add edx, 0x348
push edx
call fcn.0040d5c4
add esp, 0xc
mov edx, eax
lea eax, [ebp - 0xc]
call fcn.004ad754
inc dword [ebp - 0x1c]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x68]
mov eax, dword [eax]
mov edx, 1
mov ebx, dword [eax]
call dword [ebx + 0x20]
dec dword [ebp - 0x1c]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004ad880
jmp 0x499beb
mov ecx, 5
xor edx, edx
mov eax, dword [ebp - 0x48]
call fcn.0045fa20
mov ecx, dword [ebp - 0x48]
add ecx, 8
mov dword [ebp - 0x6c], ecx
mov word [ebp - 0x28], 0x38
mov eax, dword [ebp - 0x3c]
add eax, 0x748
push eax
push 0x4dd3aa
mov edx, dword [ebp - 0x3c]
add edx, 0x348
push edx
call fcn.0040d5c4
add esp, 0xc
mov edx, eax
lea eax, [ebp - 0x10]
call fcn.004ad754
inc dword [ebp - 0x1c]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax]
mov edx, 1
mov ebx, dword [eax]
call dword [ebx + 0x20]
dec dword [ebp - 0x1c]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004ad880
mov word [ebp - 0x28], 0
inc dword [ebp - 0x44]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0x2f8]
mov eax, dword [eax + 0x22c]
call fcn.0045fe24
mov edx, dword [ebp - 0x44]
cmp eax, edx
jg 0x499749
mov word [ebp - 0x28], 0x44
mov ecx, dword [ebp - 0x3c]
add ecx, 0x748
push ecx
push 0x4dd3b9
mov eax, dword [ebp - 0x3c]
add eax, 0x348
push eax
call fcn.0040d5c4
add esp, 0xc
mov edx, eax
lea eax, [ebp - 0x14]
call fcn.004ad754
inc dword [ebp - 0x1c]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0x344]
call fcn.0045a774
dec dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004ad880
mov ecx, dword [ebp - 0x38]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret