Function at 0x40a861
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x40a33d
mov eax, dword [ebp - 4]
add esp, 0xfffff710
push esi
push edi
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx]
mov dword [ebp - 8], ecx
mov esi, 0x4c3152
lea edi, [ebp - 0x188]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 4]
add eax, 4
push eax
lea edx, [ebp - 0x188]
push edx
call fcn.0049dac8
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x108]
mov dword [ebp - 0xc], eax
mov esi, 0x4c3258
lea edi, [ebp - 0x8c0]
mov ecx, 0x1ce
rep movsd dword es:[edi], dword [esi]
push 0x738
mov eax, dword [ebp - 4]
add eax, 0x10c
push eax
lea edx, [ebp - 0x8c0]
push edx
call fcn.0049d8d8
add esp, 0xc
push dword [ebp - 4]
call fcn.0049ce10
pop ecx
xor ecx, ecx
mov dword [ebp - 0x10], ecx
push 0x1388
push 0x4c6f3d
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40a410
push 0
push 4
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
call sub.WSOCK32.DLL_recv
cmp eax, 4
je 0x40a417
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x14], eax
xor eax, eax
jmp 0x40ae21
xor eax, eax
jmp 0x40ae21
mov edx, dword [ebp - 0x10]
cmp edx, 0x10000
jae 0x40aa7a
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff7
cmp ecx, 7
ja case.0x40a435.10
jmp dword [ecx*4 + 0x40a43c]
xor eax, eax
mov dword [ebp - 0x18], eax
push 0x1388
push 0x4c6f3f
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40a496
push 0
push 4
lea edx, [ebp - 0x18]
push edx
push dword [ebp - 8]
call sub.WSOCK32.DLL_recv
cmp eax, 4
je 0x40a49d
xor eax, eax
jmp 0x40ae21
xor eax, eax
jmp 0x40ae21
mov esi, 0x4c3990
lea edi, [ebp - 0xc64]
mov ecx, 0xe8
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x1388
push 0x4c6f41
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl case.0x40a435.10
mov esi, 0x4c3d34
lea edi, [ebp - 0x139c]
mov ecx, 0x1ce
rep movsd dword es:[edi], dword [esi]
push 5
push 0x738
lea eax, [ebp - 0x139c]
push eax
push dword [ebp - 8]
call fcn.0040ce4c
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
cmp edx, 0x738
je 0x40a50e
xor eax, eax
jmp 0x40ae21
push 5
push 0x3a2
lea edx, [ebp - 0xc64]
push edx
push dword [ebp - 8]
call fcn.0040ce4c
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, 0x3a2
je 0x40a53c
xor eax, eax
jmp 0x40ae21
mov dword [ebp - 0x20], 1
push 4
lea edx, [ebp - 0x20]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 4
lea edx, [ebp - 0x18]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 0x738
lea edx, [ebp - 0x139c]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 0x3a2
lea edx, [ebp - 0xc64]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
xor edx, edx
mov dword [ebp - 0x24], edx
push 4
lea ecx, [ebp - 0x24]
push ecx
mov eax, dword [sym.terminal.exe__MainForm]
mov edx, dword [eax]
push dword [edx + 0xe8c]
call fcn.0049cd44
add esp, 0xc
jmp case.0x40a435.10
mov esi, 0x4c446c
lea edi, [ebp - 0x16dc]
mov ecx, 0xcf
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov dword [ebp - 0x28], eax
push 0x1388
push 0x4c6f43
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40a652
push 0
push 4
lea edx, [ebp - 0x28]
push edx
push dword [ebp - 8]
call sub.WSOCK32.DLL_recv
cmp eax, 4
je 0x40a659
xor eax, eax
jmp 0x40ae21
xor eax, eax
jmp 0x40ae21
push 0x1388
push 0x4c6f45
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl case.0x40a435.10
mov esi, 0x4c47ac
lea edi, [ebp - 0x1e14]
mov ecx, 0x1ce
rep movsd dword es:[edi], dword [esi]
push 5
push 0x738
lea eax, [ebp - 0x1e14]
push eax
push dword [ebp - 8]
call fcn.0040ce4c
add esp, 0x10
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
cmp edx, 0x738
je 0x40a6b6
xor eax, eax
jmp 0x40ae21
push 5
push 0x33e
lea edx, [ebp - 0x16dc]
push edx
push dword [ebp - 8]
call fcn.0040ce4c
add esp, 0x10
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x33e
je 0x40a6e4
xor eax, eax
jmp 0x40ae21
mov dword [ebp - 0x30], 2
push 4
lea edx, [ebp - 0x30]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 4
lea edx, [ebp - 0x28]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 0x738
lea edx, [ebp - 0x1e14]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 0x33e
lea edx, [ebp - 0x16dc]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
xor edx, edx
mov dword [ebp - 0x34], edx
push 4
lea ecx, [ebp - 0x34]
push ecx
mov eax, dword [sym.terminal.exe__MainForm]
mov edx, dword [eax]
push dword [edx + 0xe8c]
call fcn.0049cd44
add esp, 0xc
jmp case.0x40a435.10
xor ecx, ecx
mov dword [ebp - 0x38], ecx
push 0x1388
push 0x4c6f47
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40a7e6
push 0
push 4
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 8]
call sub.WSOCK32.DLL_recv
cmp eax, 4
je 0x40a7ed
xor eax, eax
jmp 0x40ae21
xor eax, eax
jmp 0x40ae21
mov dword [ebp - 0x3c], 3
push 4
lea edx, [ebp - 0x3c]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 4
lea edx, [ebp - 0x38]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
xor edx, edx
mov dword [ebp - 0x40], edx
push 4
lea ecx, [ebp - 0x40]
push ecx
mov eax, dword [sym.terminal.exe__MainForm]
mov edx, dword [eax]
push dword [edx + 0xe8c]
call fcn.0049cd44
add esp, 0xc
jmp case.0x40a435.10
xor ecx, ecx
mov dword [ebp - 0x44], ecx
push 0x1388
push 0x4c6f49
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40a89b
push 0
push 4
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 8]
call sub.WSOCK32.DLL_recv
cmp eax, 4
je 0x40a8a2
xor eax, eax
jmp 0x40ae21
xor eax, eax
jmp 0x40ae21
mov dword [ebp - 0x48], 4
push 4
lea edx, [ebp - 0x48]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 4
lea edx, [ebp - 0x44]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
xor edx, edx
mov dword [ebp - 0x4c], edx
push 4
lea ecx, [ebp - 0x4c]
push ecx
mov eax, dword [sym.terminal.exe__MainForm]
mov edx, dword [eax]
push dword [edx + 0xe8c]
call fcn.0049cd44
add esp, 0xc
jmp case.0x40a435.10
xor ecx, ecx
mov dword [ebp - 0x50], ecx
push 0x1388
push 0x4c6f4b
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40a950
push 0
push 4
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 8]
call sub.WSOCK32.DLL_recv
cmp eax, 4
je 0x40a957
xor eax, eax
jmp 0x40ae21
xor eax, eax
jmp 0x40ae21
mov dword [ebp - 0x54], 5
push 4
lea edx, [ebp - 0x54]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 4
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
xor edx, edx
mov dword [ebp - 0x58], edx
push 4
lea ecx, [ebp - 0x58]
push ecx
mov eax, dword [sym.terminal.exe__MainForm]
mov edx, dword [eax]
push dword [edx + 0xe8c]
call fcn.0049cd44
add esp, 0xc
jmp case.0x40a435.10
xor ecx, ecx
mov dword [ebp - 0x5c], ecx
push 0x1388
push 0x4c6f4d
push dword [ebp - 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40aa05
push 0
push 4
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 8]
call sub.WSOCK32.DLL_recv
cmp eax, 4
je 0x40aa0c
xor eax, eax
jmp 0x40ae21
xor eax, eax
jmp 0x40ae21
mov dword [ebp - 0x60], 6
push 4
lea edx, [ebp - 0x60]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
push 4
lea edx, [ebp - 0x5c]
push edx
mov ecx, dword [sym.terminal.exe__MainForm]
mov eax, dword [ecx]
push dword [eax + 0xe8c]
call fcn.0049cd84
add esp, 0xc
test eax, eax
jle case.0x40a435.10
xor edx, edx
mov dword [ebp - 0x64], edx
push 4
lea ecx, [ebp - 0x64]
push ecx
mov eax, dword [sym.terminal.exe__MainForm]
mov edx, dword [eax]
push dword [edx + 0xe8c]
call fcn.0049cd44
add esp, 0xc
xor eax, eax
jmp 0x40ae21
push 0
push 0
push dword [ebp - 0xc]
lea edx, [ebp - 0x188]
push edx
call fcn.0040cc58
add esp, 0x10
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x68]
test ecx, ecx
jg 0x40aae8
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x6c], eax
mov esi, 0x4c4ee4
lea edi, [ebp - 0x1f18]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 0x6c]
push dword [ebp - 0xc]
lea eax, [ebp - 0x188]
push eax
push 0x4c6f4f
lea edx, [ebp - 0x1f18]
push edx
call fcn.004a16bc
add esp, 0x14
lea ecx, [ebp - 0x1f18]
push ecx
call sub.KERNEL32.DLL_OutputDebugStringA
xor eax, eax
jmp 0x40ae21
mov dword [ebp - 0x8c0], 3
push 0
push 0x738
lea edx, [ebp - 0x8c0]
push edx
push dword [ebp - 0x68]
call sub.WSOCK32.DLL_send
push 0
push 4
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x68]
call sub.WSOCK32.DLL_send
mov esi, 0x4c4fe8
lea edi, [ebp - 0x231c]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x4c53e9
lea edi, [ebp - 0x2720]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x4c57ea
lea edi, [ebp - 0x2784]
mov ecx, 0x19
rep movsd dword es:[edi], dword [esi]
mov esi, 0x4c584e
lea edi, [ebp - 0x27e8]
mov ecx, 0x19
rep movsd dword es:[edi], dword [esi]
xor eax, eax
mov dword [ebp - 0x70], eax
push 0x4c6f8d
lea edx, [ebp - 0x27e8]
push edx
call fcn.0049dac8
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x74], ecx
push 0x1388
push 0x4c6f8f
push dword [ebp - 0x68]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40abac
push 0
push 4
lea eax, [ebp - 0x70]
push eax
push dword [ebp - 0x68]
call sub.WSOCK32.DLL_recv
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x74]
test edx, edx
jg 0x40abc2
push dword [ebp - 0x68]
call sub.WSOCK32.DLL_closesocket
xor eax, eax
jmp 0x40ae21
push 0x1388
push 0x4c6f91
push dword [ebp - 0x68]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
jl 0x40abf5
push 5
push dword [ebp - 0x70]
lea edx, [ebp - 0x231c]
push edx
push dword [ebp - 0x68]
call fcn.0040ce4c
add esp, 0x10
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x74]
test ecx, ecx
jg 0x40ac0b
push dword [ebp - 0x68]
call sub.WSOCK32.DLL_closesocket
xor eax, eax
jmp 0x40ae21
mov edx, dword [ebp - 0x74]
mov byte [ebp + edx - 0x231c], 0
lea ecx, [ebp - 0x27e8]
push ecx
call fcn.0049daf8
pop ecx
test eax, eax
ja 0x40ac4f
push 0x4c6f93
call fcn.0049daf8
pop ecx
inc eax
push eax
call fcn.0049cfe8
pop ecx
mov dword [ebp - 0x78], eax
push 0x4c6f9d
push dword [ebp - 0x78]
call fcn.0049dac8
add esp, 8
jmp 0x40ac79
lea eax, [ebp - 0x27e8]
push eax
call fcn.0049daf8
pop ecx
inc eax
push eax
call fcn.0049cfe8
pop ecx
mov dword [ebp - 0x78], eax
lea edx, [ebp - 0x27e8]
push edx
push dword [ebp - 0x78]
call fcn.0049dac8
add esp, 8
push dword [ebp - 0x78]
lea ecx, [ebp - 0x231c]
push ecx
call fcn.0040c45c
add esp, 8
push dword [ebp - 0x78]
call fcn.0049ce20
pop ecx
push 0x4c6fa7
lea eax, [ebp - 0x231c]
push eax
call fcn.0049dc09
add esp, 8
mov dword [ebp - 0x7c], eax
lea edx, [ebp - 0x231c]
push edx
call fcn.0049daf8
pop ecx
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x7c]
test ecx, ecx
je 0x40ad24
lea eax, [ebp - 0x231c]
mov edx, dword [ebp - 0x7c]
sub edx, eax
mov dword [ebp - 0x80], edx
push dword [ebp - 0x80]
lea ecx, [ebp - 0x231c]
push ecx
lea eax, [ebp - 0x2784]
push eax
call fcn.0049dcf8
add esp, 0xc
mov edx, dword [ebp - 0x80]
mov byte [ebp + edx - 0x2784], 0
lea ecx, [ebp - 0x231c]
push ecx
call fcn.0049daf8
pop ecx
mov edx, dword [ebp - 0x80]
sub eax, edx
push eax
lea eax, [ebp - 0x231b]
mov ecx, dword [ebp - 0x80]
add eax, ecx
push eax
lea eax, [ebp - 0x2720]
push eax
call fcn.0049dcf8
add esp, 0xc
jmp 0x40ad50
lea edx, [ebp - 0x231c]
push edx
lea ecx, [ebp - 0x2784]
push ecx
call fcn.0049dac8
add esp, 8
lea eax, [ebp - 0x231c]
push eax
lea edx, [ebp - 0x2720]
push edx
call fcn.0049dac8
add esp, 8
lea ecx, [ebp - 0x27e8]
push ecx
lea eax, [ebp - 0x2784]
push eax
call fcn.0049da7c
add esp, 8
test eax, eax
je 0x40ad90
mov dword [ebp - 0x74], 0xfffffffe
push 0
push 4
lea edx, [ebp - 0x74]
push edx
push dword [ebp - 0x68]
call sub.WSOCK32.DLL_send
push dword [ebp - 0x68]
call sub.WSOCK32.DLL_closesocket
xor eax, eax
jmp 0x40ae21
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x28f0], edx
xor ecx, ecx
mov dword [ebp - 0x28f4], ecx
lea eax, [ebp - 0x2720]
push eax
lea edx, [ebp - 0x28ec]
push edx
call fcn.0049dac8
add esp, 8
lea ecx, [ebp - 0x28f4]
push ecx
call fcn.00408c24
mov dword [ebp - 0x74], eax
push dword [ebp - 0x68]
call sub.WSOCK32.DLL_closesocket
mov eax, dword [ebp - 0x74]
cmp eax, 0xfffffffd
jne 0x40ae1c
mov edx, dword [sym.terminal.exe__MainForm]
push dword [edx]
call fcn.00403d00
pop ecx
mov ecx, dword [0x4ead88]
mov eax, dword [ecx]
call fcn.00438228
xor edx, edx
mov dword [ebp - 0x84], edx
lea ecx, [ebp - 0x84]
push ecx
call sub.KERNEL32.DLL_GetCurrentProcess
push eax
call sub.KERNEL32.DLL_GetExitCodeProcess
push dword [ebp - 0x84]
call sub.KERNEL32.DLL_GetCurrentProcess
push eax
call sub.KERNEL32.DLL_TerminateProcess
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4