Function at 0x42f820
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov eax, dword [0x5c81a0]
sub esp, 0x1c
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
mov esi, ecx
je 0x42f840
cmp esi, eax
je 0x42f848
mov eax, dword [eax + 0x890]
cmp eax, ebx
jne 0x42f832
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret
mov ecx, dword [esi + 0x88c]
call fcn.004f0af0
test eax, eax
jne 0x42f86b
mov edx, 0x5a4bec
mov ecx, esi
call fcn.0042f110
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret
cmp dword [esi + 0x530], ebx
mov dword [esi + 0x520], 2
mov dword [esi + 0x878], ebx
mov dword [esi + 0x87c], ebx
jne 0x42f895
cmp dword [esi + 0x884], ebx
je 0x42f941
cmp word [esi + 0x51c], bx
jne 0x42f941
cmp dword [0x5cd3e0], ebx
je 0x42f8f8
mov eax, dword [0x5c9d44]
push eax
xor edx, edx
mov ecx, 0x523
mov dword [0x5bfd5c], ebx
call fcn.0041f1a0
mov ecx, dword [esi]
mov edx, eax
call fcn.00513d20
call fcn.00420bb0
mov ecx, dword [esi + 0x88c]
push ecx
push eax
push 1
lea ecx, [esi + 0x4b8]
xor edx, edx
mov dword [esi + 0x52c], eax
call fcn.0048ab30
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
mov eax, dword [esi + 0x88c]
mov cl, byte [eax + 0x8a4]
add eax, 0x8a4
cmp cl, bl
je 0x42f863
push eax
lea ecx, [esi + 0x4b8]
mov edx, 0x64
call fcn.00420d70
mov edx, 8
mov ecx, esi
call fcn.0042f530
test eax, eax
je 0x42f863
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
push edi
lea edi, [esi + 0x4b8]
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
mov ecx, dword [0x5cd3e0]
mov dword [esp + 0xc], eax
jne 0x42f9ad
cmp ecx, ebx
je 0x42f96a
cmp dword [0x5cd3dc], ebx
jne 0x42f9ad
cmp dword [esi + 0x534], ebx
je 0x42f98f
mov ecx, dword [esi]
push 7
push ebx
push edi
lea edx, [esi + 0x3f0]
call fcn.00475c40
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
xor edx, edx
mov ecx, 0x524
call fcn.0041f1a0
mov edx, eax
mov ecx, esi
call fcn.0042f110
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret
cmp ecx, ebx
je 0x42fa01
mov edx, dword [0x5c9d44]
push edx
xor edx, edx
mov ecx, 0x523
mov dword [0x5bfd5c], ebx
call fcn.0041f1a0
mov ecx, dword [esi]
mov edx, eax
call fcn.00513d20
call fcn.00420bb0
mov ecx, dword [esi + 0x88c]
mov dx, word [esi + 0x51c]
push ecx
push eax
push ebx
mov ecx, edi
mov dword [esi + 0x52c], eax
call fcn.0048ab30
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret
lea edx, [esp + 0xc]
mov dword [esp + 0x10], edx
xor edx, edx
mov dx, word [esi + 0x51c]
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], ecx
push edx
mov word [esp + 0x1c], 2
mov dword [esp + 0x20], eax
call dword [sym.imp.WSOCK32.dll_htons]
mov dx, word [0x5bfd6c]
push 1
mov word [esp + 0x1e], ax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push ebx
push 2
mov dword [esp + 0x28], ecx
mov cx, word [0x5bfd68]
push ebx
call fcn.00515a30
cmp eax, 0xffffffff
mov dword [esi + 0x888], eax
jne 0x42fa8b
xor edx, edx
mov ecx, 0x518
call fcn.0041f1a0
mov edx, eax
mov ecx, esi
call fcn.0042f110
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret
mov ecx, eax
call fcn.00569850
mov edx, dword [0x5f92ec]
mov eax, dword [esi + 0x888]
push 0x10
push 0x801c
push edx
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov edx, dword [esi + 0x888]
push 0x10
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x42fade
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x42fade
mov edx, 0x5a4bec
mov ecx, esi
call fcn.0042f110
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret