Function at 0x426130
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x1cc
mov eax, dword [0x4af6f0]
xor eax, esp
mov dword [esp + 0x1c8], eax
push ebp
mov ebp, dword [esp + 0x1d4]
push edi
mov edi, dword [esp + 0x1e8]
lea edx, [esp + 0x40]
mov dword [esp + 0x10], edi
mov eax, ebp
sub edx, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x426160
xor eax, eax
lea esp, [esp]
mov cl, byte [eax + str.www.avanquest.com]
mov byte [esp + eax + 0x40], cl
inc eax
test cl, cl
jne 0x426170
lea eax, [esp + 0x40]
push eax
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4261b2
test edi, edi
je 0x426199
mov dword [edi], eax
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.0046ebfa
add esp, 0x1cc
ret
push esi
push 0
push 0
push 0
push 1
push 3
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
mov dword [esp + 0x10], esi
cmp esi, 0xffffffff
jne 0x4261fc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x4261dc
mov dword [edi], eax
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop esi
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.0046ebfa
add esp, 0x1cc
ret
cmp dword [esp + 0x1e4], 1
jge 0x426211
mov dword [esp + 0x1e4], 0x3e8
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [esp + 0x1ec]
push ecx
push 0x1006
push 0xffff
push esi
call ebx
cmp eax, 0xffffffff
je 0x426250
push 4
lea edx, [esp + 0x1ec]
push edx
push 0x1005
push 0xffff
push esi
call ebx
cmp eax, 0xffffffff
jne 0x426270
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x42625c
mov dword [edi], eax
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x4264a0
xor eax, eax
push eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x34]
push ecx
push ebp
call fcn.00425f30
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x4262b6
test edi, edi
je 0x4262a2
mov dword [edi], ebp
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x4264a0
mov edi, dword [esp + 0x1e4]
cmp edi, 1
jge 0x4262c7
mov edi, 0x20
push 0x400
push 8
add edi, 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x42630c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4262f4
mov dword [eax], 8
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x4264a0
push 0x400
push 0
push esi
call fcn.0046f6e0
push edi
push esi
call fcn.00425e20
add esp, 0x14
push 0x400
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x426370
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x426358
mov dword [eax], 8
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x4264a0
mov dword [esp + 0x24], 0x10
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esp + 0x1ec], 0
jge 0x426398
mov dword [esp + 0x1ec], 4
cmp dword [esp + 0x1ec], 0
mov dword [esp + 0x20], 0
jl 0x42645b
mov edi, edi
mov dx, word [esp + 0x20]
xor ecx, ecx
push edi
push esi
mov word [esi + 2], cx
mov word [esi + 6], dx
call fcn.00425e60
mov ebx, dword [esp + 0x1c]
add esp, 8
push 0x10
mov word [esi + 2], ax
lea eax, [esp + 0x2c]
push eax
push 0
push edi
push esi
push ebx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x42640a
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0
push 0x400
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x426442
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x274c
jne 0x42645f
push 0x1f4
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x20]
inc eax
movzx ecx, ax
cmp ecx, dword [esp + 0x1ec]
mov dword [esp + 0x20], eax
jle 0x4263b0
jmp 0x42645f
lea edx, [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0x24]
push eax
call fcn.00425ef0
add esp, 0xc
mov byte [esp + 0x13], al
jmp 0x42645f
mov ebx, dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
call edi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
mov ecx, dword [esp + 0x1c]
push ecx
push 0
call edi
push eax
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x42648f
mov dword [eax], ebp
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x1d8]
pop ebx
pop esi
pop edi
pop ebp
xor ecx, esp
call fcn.0046ebfa
add esp, 0x1cc
ret