Function at 0x1009e440
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x36c]
sub esp, 0x36c
push 0xffffffffffffffff
push 0x10148518
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x10189710]
xor eax, ebp
mov dword [ebp + 0x368], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x378]
mov edi, dword [ebp + 0x374]
mov esi, dword [ebp + 0x37c]
mov ebx, dword [ebp + 0x380]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x384]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x1c], eax
xor eax, eax
lea ecx, [ebp]
push ecx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], eax
call fcn.1009ea30
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp + 0x30], esi
mov dword [ebp + 0x240], ebx
mov dword [ebp + 0x248], eax
mov dword [ebp + 0x23c], eax
mov dword [ebp + 0x354], eax
cmp dword [0x101b9884], eax
je 0x1009e4f0
push str._ERA__InitMwPRoxyDb
push eax
call fcn.1006ed90
add esp, 8
mov ebx, dword [ebp - 0x1c]
mov edx, ebx
lea ecx, [ebp - 0x28]
call section..text
test eax, eax
jne 0x1009e520
cmp dword [0x101b9884], eax
je 0x1009e9f9
push str._ERA__InitMwPRoxyDb_ret_false
push eax
call fcn.1006ed90
add esp, 8
jmp 0x1009e9f9
test edi, edi
je 0x1009e55a
cmp byte [edi], 0
je 0x1009e55a
push 0
push edi
call fcn.10069e60
add esp, 8
test eax, eax
je 0x1009e55a
cmp dword [0x101b9884], 0
je 0x1009e551
push edi
push str._ERA__GetHostId__Host:_s___IP:_s_
push 0
call fcn.1006ed90
add esp, 0xc
lea edx, [ebp - 0x14]
push edx
push edi
push 0
jmp 0x1009e580
cmp dword [0x101b9884], 0
je 0x1009e577
mov eax, dword [ebp - 0x20]
push eax
push edi
push str._ERA__GetHostId__Host:_s___IP:_s_
push 0
call fcn.1006ed90
add esp, 0x10
mov edx, dword [ebp - 0x20]
lea ecx, [ebp - 0x14]
push ecx
push edx
push edi
mov esi, dword [ebp - 0x28]
push esi
mov edx, ebx
lea ecx, [ebp + 0x34]
call fcn.10001190
cmp dword [0x101b9884], 0
mov edi, eax
je 0x1009e5c5
lea eax, [ebp + 0x34]
push eax
push edi
push str._ERA__GetHostId_ret:__d__RemID:__s_
push 0
call fcn.1006ed90
add esp, 0x10
cmp dword [0x101b9884], 0
je 0x1009e5c5
push str._ERA__DeInitDB
push 0
call fcn.1006ed90
add esp, 8
push 1
mov eax, esi
call fcn.1011a6f0
add esp, 4
test edi, edi
je 0x1009e9dc
cmp dword [ebp - 0x14], 0
je 0x1009e9dc
cmp dword [0x101b9884], 0
mov dword [ebp - 0x14], 0
je 0x1009e602
push str._ERA__InitDLLs
push 0
call fcn.1006ed90
add esp, 8
call fcn.1009e280
cmp dword [0x101b9884], 0
je 0x1009e61f
push str._ERA__socket
push 0
call fcn.1006ed90
add esp, 8
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov ebx, eax
mov dword [ebp - 0x20], ebx
cmp ebx, 0xffffffff
jne 0x1009e67a
cmp dword [0x101b9884], 0
je 0x1009e653
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._ERA__Failed_to_create_socket__WSAGetLastError___:__d
push 0
call fcn.1006ed90
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x1009e973
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x1c]
push eax
push str.Failed_to_create_socket__WSAGetLastError___:__d
push ecx
call fcn.10127dc0
add esp, 0xc
jmp 0x1009e973
mov edx, 2
push 0x1fa2
mov word [ebp + 0x358], dx
call sub.WS2_32.dll_htons
push str.127.0.0.1
mov word [ebp + 0x35a], ax
call sub.WS2_32.dll_inet_addr
cmp dword [0x101b9884], 0
mov dword [ebp + 0x35c], eax
je 0x1009e6bf
push str._ERA__connSocket_to_127.0.0.1
push 0
call fcn.1006ed90
add esp, 8
push 0x10
lea eax, [ebp + 0x358]
push eax
push ebx
call sub.WS2_32.dll_connect
test eax, eax
jge 0x1009e6ff
cmp dword [0x101b9884], 0
je 0x1009e6ea
push str._ERA__Error_connecting_to_the_MWPRoxy_server__WSAGetLastError___:__d
push 0
call fcn.1006ed90
add esp, 8
mov esi, dword [ebp - 0x1c]
push str.Error_connecting_to_the_MWPRoxy_server__WSAGetLastError___:__d
call fcn.1009e190
add esp, 4
jmp 0x1009e973
cmp dword [0x101b9884], 0
je 0x1009e717
push str._ERA__setsockopt
push 0
call fcn.1006ed90
add esp, 8
push 4
lea ecx, [ebp - 0x34]
push ecx
push 1
push 6
push ebx
mov dword [ebp - 0x34], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, dword [ebp - 0x30]
jmp 0x1009e740
mov byte [ebp - 4], 1
cmp dword [0x101b9884], 0
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x17], 0
je 0x1009e764
push str._ERA__recv
push 0
call fcn.1006ed90
add esp, 8
test esi, esi
je 0x1009e84e
mov eax, str.dumm
mov ecx, esi
call fcn.1005a140
test eax, eax
jne 0x1009e84e
lea edx, [ebp - 0x24]
push edx
push str.ESRATimeout
mov ecx, str.SoftwareMicroWorld
mov edx, reloc.WS2_32.dll_bind
mov dword [ebp - 0x24], 4
call fcn.10059e30
mov eax, dword [ebp - 0x24]
push eax
push ebx
call fcn.1009e330
add esp, 8
cmp eax, 0xffffffff
jne 0x1009e7f5
cmp dword [0x101b9884], 0
je 0x1009e7d0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._ERA__Socket_Error__WSAGetLastError___:__d
push 0
call fcn.1006ed90
add esp, 0xc
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x1009e7ec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Socket_Error__WSAGetLastError___:__d
push esi
call fcn.10127dc0
add esp, 0xc
mov byte [ebp - 4], 0
jmp 0x1009e973
test eax, eax
jne 0x1009e835
cmp dword [0x101b9884], eax
je 0x1009e813
mov ecx, dword [ebp - 0x24]
push ecx
push str._ERA__Socket_Not_Readable_within__d_secs
push eax
call fcn.1006ed90
add esp, 0xc
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x1009e7ec
mov edx, dword [ebp - 0x24]
push edx
push str.Socket_Not_Readable_within__d_secs
push eax
call fcn.10127dc0
add esp, 0xc
mov byte [ebp - 4], 0
jmp 0x1009e973
cmp dword [0x101b9884], 0
je 0x1009e84e
push eax
push str._ERA__Socket_Readable:_rs___d
push 0
call fcn.1006ed90
add esp, 0xc
push 0
push 1
lea eax, [ebp - 0x18]
push eax
push ebx
call sub.WS2_32.dll_recv
cmp dword [0x101b9884], 0
mov edi, eax
je 0x1009e87b
lea ecx, [ebp - 0x18]
push ecx
push edi
push str._ERA__bytes_recv___d__cmd___s
push 0
call fcn.1006ed90
add esp, 0x10
test edi, edi
jg 0x1009e8c5
cmp dword [0x101b9884], 0
je 0x1009e89f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str._ERA__Number_of_bytes_received__d__WSAGetLastError___:__d
push 0
call fcn.1006ed90
add esp, 0x10
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x1009e8bc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Number_of_bytes_received__d__WSAGetLastError___:__d
push esi
call fcn.10127dc0
add esp, 0x10
mov byte [ebp - 4], 0
jmp 0x1009e973
cmp dword [0x101b9884], 0
je 0x1009e8dd
push str._ERA__ProcessCommand
push 0
call fcn.1006ed90
add esp, 8
mov edx, dword [ebp - 0x1c]
push edx
mov dl, byte [ebp - 0x18]
lea eax, [ebp]
push eax
push esi
lea ecx, [ebp - 0x2c]
push ecx
mov ecx, dword [ebp - 0x38]
push ebx
call fcn.1009eae0
test eax, eax
jne 0x1009e916
cmp dword [0x101b9884], eax
je 0x1009e910
push str._ERA__ProcessCommand_returns_FALSE
push eax
call fcn.1006ed90
add esp, 8
mov byte [ebp - 4], 0
jmp 0x1009e973
mov edi, 1
cmp dword [ebp - 0x2c], edi
jne 0x1009e941
cmp dword [0x101b9884], 0
je 0x1009e938
push str._ERA__ProcessCommand_returns_TRUE_with_AckRecv__TRUE
push 0
call fcn.1006ed90
add esp, 8
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 0
jmp 0x1009e973
mov dword [ebp - 4], 0
jmp 0x1009e740
cmp dword [0x101b9884], 0
je 0x1009e98b
push str._ERA__closesocket
push 0
call fcn.1006ed90
add esp, 8
cmp ebx, 0xffffffff
je 0x1009e996
push ebx
call sub.WS2_32.dll_closesocket
cmp dword [0x101b9884], 0
je 0x1009e9b2
mov edx, dword [ebp - 0x14]
push edx
push str._ERA__returns_rVal___d
push 0
call fcn.1006ed90
add esp, 0xc
mov eax, dword [ebp + 0x248]
test eax, eax
je 0x1009e9cf
push eax
call fcn.10129ad3
add esp, 4
mov dword [ebp + 0x248], 0
lea esi, [ebp]
call fcn.1009ea90
mov eax, dword [ebp - 0x14]
jmp 0x1009ea03
cmp dword [0x101b9884], 0
je 0x1009e9f9
mov eax, dword [ebp - 0x14]
push eax
push edi
push str._ERA__rVal___d__RecFound___d
push 0
call fcn.1006ed90
add esp, 0x10
lea esi, [ebp]
call fcn.1009ea90
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x368]
xor ecx, ebp
call fcn.10127db1
add ebp, 0x36c
mov esp, ebp
pop ebp
ret 0x14