Function at 0x434f48
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x26c
push ebx
push esi
mov esi, dword [esp + 0x278]
xor ebx, ebx
test esi, esi
je 0x4352e4
push edi
mov edi, dword [esp + 0x284]
push 2
pop ecx
push 0x17
pop eax
test edi, 0x10000000
je 0x434f8a
and edi, 0xefffffff
mov dword [esp + 0x14], eax
mov dword [esp + 0x284], edi
jmp 0x434f90
mov eax, ecx
mov dword [esp + 0x14], ecx
test edi, edi
jne 0x434f9c
inc edi
mov dword [esp + 0x284], edi
push ebp
push 0
push edi
push eax
call dword [sym.imp.WSOCK32.DLL_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4352e2
push 0x17
pop ecx
cmp dword [esp + 0x18], ecx
jne 0x435026
cmp dword [0x4a6488], ebx
je 0x4352db
lea eax, [esp + 0x64]
push eax
push esi
push ecx
call fcn.00434cbf
add esp, 0xc
test eax, eax
jg 0x43501c
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push esi
call dword [0x4a6494]
test eax, eax
jne 0x4352db
mov eax, dword [esp + 0x1c]
lea edi, [esp + 0x64]
push eax
mov esi, dword [eax + 0x18]
add esi, 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [0x4a6498]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x288]
mov dword [esp + 0x10], eax
jmp 0x435064
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jmp 0x435064
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
mov ecx, eax
mov dword [esp + 0x10], ecx
cmp ecx, 0xffffffff
jne 0x435054
push esi
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
test eax, eax
je 0x435050
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
jmp 0x435054
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, 0xffffffff
setne al
test eax, eax
je 0x4352db
mov esi, dword [esp + 0x290]
cmp dword [esp + 0x294], ebx
jne 0x43507c
test esi, esi
je 0x4350ed
cmp byte [esi], bl
je 0x4350ed
push 0x10
lea eax, [esp + 0x24]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
mov word [esp + 0x20], ax
cmp dword [esp + 0x294], ebx
je 0x4350b0
push dword [esp + 0x294]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x22], ax
test esi, esi
je 0x4350d3
cmp byte [esi], bl
je 0x4350d3
push esi
call fcn.00481f40
mov esi, eax
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
push esi
mov dword [esp + 0x28], eax
call fcn.00481f30
jmp 0x4350d7
and dword [esp + 0x24], ebx
push 0x10
lea eax, [esp + 0x24]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_bind]
test eax, eax
jne 0x4352db
xor eax, eax
inc eax
cmp edi, eax
jne 0x43528e
mov esi, dword [esp + 0x18]
push 0x17
pop edi
cmp esi, edi
jne 0x43513d
push 0x1c
lea eax, [esp + 0x4c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [esp + 0x48], di
push dword [esp + 0x284]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x4a], ax
lea esi, [esp + 0x64]
lea edi, [esp + 0x50]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x18]
jmp 0x435170
push 0x10
lea eax, [esp + 0x34]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
push dword [esp + 0x284]
mov word [esp + 0x34], ax
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x32], ax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], eax
mov edi, dword [esp + 0x28c]
test edi, edi
jle 0x435248
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x4352db
cmp esi, 0x17
jne 0x4351ad
push 0x1c
lea eax, [esp + 0x4c]
jmp 0x4351b3
push 0x10
lea eax, [esp + 0x34]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x4352db
mov eax, edi
mov dword [esp + 0x78], ebp
cdq
mov ecx, 0x3e8
idiv ecx
xor esi, esi
mov dword [esp + 0x17c], ebp
mov dword [esp + 0x40], eax
inc esi
imul eax, eax, 0x3e8
mov dword [esp + 0x74], esi
mov dword [esp + 0x178], esi
sub edi, eax
imul eax, edi, 0x3e8
mov dword [esp + 0x44], eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x17c]
push eax
lea eax, [esp + 0x7c]
push eax
push 0
lea eax, [ebp + 1]
push eax
call dword [sym.imp.WSOCK32.DLL_select]
cmp eax, esi
jne 0x435230
lea eax, [esp + 0x74]
push eax
push ebp
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x435230
mov ebx, esi
and dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
jmp 0x43526d
cmp esi, 0x17
jne 0x435255
push 0x1c
lea eax, [esp + 0x4c]
jmp 0x43525b
push 0x10
lea eax, [esp + 0x34]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x4352db
xor esi, esi
inc esi
mov ebx, esi
test ebx, ebx
je 0x4352db
push 0x10
push 0
push dword [0x4a5a70]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x4352db
mov dword [ebx], esi
mov dword [ebx + 8], ebp
jmp 0x4352d5
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x4352db
push 0x20
push eax
push dword [0x4a5a70]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x4352db
push 2
pop eax
mov dword [ebx], eax
mov eax, dword [esp + 0x10]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x284]
mov dword [ebx + 0x10], ebp
mov dword [ebx + 8], eax
and dword [ebx + 0xc], 0
jmp 0x4352e2
push ebp
call dword [sym.imp.WSOCK32.DLL_closesocket]
pop ebp
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x26c
ret 0x18