Function at 0x4276c0
Capabilities:
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x8c
mov ecx, dword [0x5109bc]
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x8c]
push eax
push ecx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], 0
call fcn.004851a0
mov ebp, dword [esp + 0xac]
xor eax, eax
lea edi, [ebp + 0x190]
mov ecx, 0x13
rep stosd dword es:[edi], eax
mov dword [ebp], eax
mov eax, dword [0x4f7218]
mov dword [ebp + 0x1e8], eax
mov eax, dword [esp + 0xc0]
add esp, 0xc
test eax, eax
jne 0x427728
mov dword [esp + 0xb4], 0xcea
mov eax, dword [esp + 0xb8]
test eax, eax
jne 0x42773f
mov eax, str._tmp_mysql.sock
mov dword [esp + 0xb8], eax
test eax, eax
mov byte [ebp + 0x18d], 1
jne 0x427785
mov ebx, dword [esp + 0xa4]
test ebx, ebx
jne 0x427760
call fcn.00427d70
test al, al
jne 0x427785
jmp 0x427772
mov edi, 0x4e868c
mov esi, ebx
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x427785
mov al, byte [ebp + 0x199]
test al, al
jne 0x427785
mov al, byte [0x51fd0c]
test al, al
jne 0x4277fc
mov edx, dword [ebp + 0x190]
lea eax, [esp + 0xb8]
push eax
lea ecx, [esp + 0xa8]
push ecx
push edx
push ebp
call fcn.00427080
add esp, 0x10
cmp eax, 0xffffffff
jne 0x427866
mov al, byte [ebp + 0x199]
test al, al
jne 0x427d36
mov ebx, dword [esp + 0xa4]
test ebx, ebx
je 0x4277dd
mov edi, 0x4e868c
mov esi, ebx
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x427d36
mov esi, dword [esp + 0xb8]
test esi, esi
je 0x4277fc
mov edi, str.MySQL
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x427d36
test ebx, ebx
mov dword [esp + 0xb8], 0
jne 0x427810
mov ebx, str.localhost
mov eax, dword [str.__.64s_via_TCP_IP]
push ebx
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.004b5820
add esp, 0xc
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x24], esi
jne 0x427898
mov dword [ebp + 0xe4], 0x7d4
call sub.WSOCK32.dll_WSAGetLastError
mov edx, dword [ebp + 0xe4]
push eax
mov eax, dword [edx*4 + 0x4e7648]
push eax
lea ecx, [ebp + 0x1c]
push ecx
call fcn.004b5820
jmp 0x427d33
push eax
call fcn.00473ae0
mov ebx, dword [esp + 0xa8]
mov dword [ebp], eax
mov eax, dword [esp + 0xbc]
mov ecx, dword [str.__.64s_via_named_pipe]
push eax
push ebx
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.004b5820
add esp, 0x14
jmp 0x4279a7
push 0
push 1
push esi
call fcn.00473a50
xor edx, edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
add esp, 0xc
mov dword [esp + 0x1c], edx
push ebx
mov dword [ebp], eax
mov dword [esp + 0x24], edx
mov word [esp + 0x18], 2
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
je 0x4278d2
mov dword [esp + 0x18], eax
jmp 0x427923
push ebx
call sub.WSOCK32.dll_gethostbyname
test eax, eax
jne 0x427904
mov dword [ebp + 0xe4], 0x7d5
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov eax, dword [str.Unknown_MySQL_Server_Host___.64s___d_]
push ebx
push eax
lea ecx, [ebp + 0x1c]
push ecx
call fcn.004b5820
add esp, 0x10
jmp 0x427d36
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov esi, dword [edx]
mov eax, ecx
shr ecx, 2
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0xb4]
push ecx
call sub.WSOCK32.dll_htons
mov edx, dword [ebp + 0x190]
push edx
mov word [esp + 0x1a], ax
push 0x10
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.00427da0
add esp, 0x10
test eax, eax
jge 0x427992
mov dword [ebp + 0xe4], 0x7d3
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, dword [str.Cant_connect_to_MySQL_server_on___.64s___d_]
push eax
push ebx
push ecx
lea edx, [ebp + 0x1c]
push edx
call fcn.004b5820
mov eax, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x427d36
lea eax, [esp + 0x10]
push eax
call fcn.004851f0
add esp, 4
jmp 0x427d36
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4279a7
lea ecx, [esp + 0x10]
push ecx
call fcn.004851f0
add esp, 4
mov eax, dword [ebp]
test eax, eax
je 0x427d09
push eax
push ebp
call fcn.0042bb30
add esp, 8
test eax, eax
jne 0x427d09
mov edx, dword [ebp]
push 1
push edx
call fcn.00473c10
add esp, 8
push ebp
mov dword [ebp + 0x140], 0xa
call fcn.004272a0
mov edi, eax
cmp edi, 0xffffffff
je 0x427d36
mov ecx, dword [ebp + 0x18]
xor eax, eax
mov al, byte [ecx]
cmp eax, 0xa
mov dword [ebp + 0x140], eax
je 0x427a29
cmp eax, 9
je 0x427a29
push 0xa
mov dword [ebp + 0xe4], 0x7d7
mov ecx, dword [str.Protocol_mismatch._Server_Version___d_Client_Version___d]
push eax
push ecx
lea edx, [ebp + 0x1c]
push edx
call fcn.004b5820
add esp, 0x10
jmp 0x427d36
inc ecx
push ecx
call fcn.00489c3e
mov esi, eax
mov eax, dword [esi + 1]
push 8
mov dword [ebp + 0x14c], eax
add esi, 5
lea eax, [ebp + 0x1dc]
push esi
push eax
call fcn.00489d2e
mov ecx, dword [ebp + 0x18]
mov edx, esi
sub edx, ecx
lea ecx, [edx + 9]
add esp, 0x10
cmp edi, ecx
jbe 0x427a6a
xor eax, eax
mov ax, word [esi + 9]
mov dword [ebp + 0x13c], eax
mov ecx, dword [esp + 0xa8]
test ecx, ecx
mov eax, 0x50f0d4
jne 0x427a81
mov dword [esp + 0xa8], eax
mov ecx, dword [esp + 0xac]
test ecx, ecx
jne 0x427a93
mov dword [esp + 0xac], eax
mov edi, dword [esp + 0xb8]
test edi, edi
je 0x427aa9
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
jmp 0x427aae
mov ecx, 1
push 0
push edx
lea eax, [ebp + 0x124]
push eax
push ecx
or ecx, 0xffffffff
lea edi, [ebp + 0x120]
push edi
xor eax, eax
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
push ecx
or ecx, 0xffffffff
lea edi, [esp + 0x40]
repne scasb al, byte es:[edi]
lea esi, [ebp + 0x114]
push esi
not ecx
push ecx
lea edi, [ebp + 0x128]
push edi
push eax
call fcn.00481940
add esp, 0x28
test eax, eax
je 0x427cea
mov ecx, dword [esp + 0xa8]
push 0
push ecx
call fcn.004800e0
add esp, 8
test eax, eax
mov dword [ebp + 0x118], eax
je 0x427cea
mov edx, dword [esp + 0xac]
push 0
push edx
call fcn.004800e0
add esp, 8
test eax, eax
mov dword [ebp + 0x11c], eax
je 0x427cea
mov ecx, dword [edi]
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.00489da6
mov edx, dword [esi]
push ebx
push edx
call fcn.00489da6
mov eax, dword [esp + 0xc8]
add esp, 0x10
test eax, eax
je 0x427b6d
push eax
mov eax, dword [ebp + 0x120]
push eax
call fcn.00489da6
add esp, 8
jmp 0x427b77
mov dword [ebp + 0x120], 0
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x124]
inc ecx
push ecx
push edx
call fcn.00489da6
mov ebx, dword [esp + 0xc4]
mov ecx, dword [ebp + 0x194]
mov edi, dword [esp + 0xb8]
mov eax, dword [esp + 0xbc]
or ecx, ebx
add esp, 8
or ebx, 0x85
test edi, edi
mov dword [ebp + 0x134], eax
mov dword [ebp + 0x138], ecx
je 0x427bc1
or ebx, 8
test byte [ebp + 0x13c], 0x20
je 0x427bde
mov al, byte [ebp + 0x198]
test al, al
jne 0x427bd9
test bl, 0x20
je 0x427bde
or ebx, 0x20
jmp 0x427be1
and ebx, 0xffffffdf
mov dword [ebp + 0x138], ebx
mov eax, dword [0x4edac8]
mov dl, byte [0x4edaca]
mov byte [esp + 0x2a], al
shr eax, 8
mov byte [esp + 0x2b], al
mov eax, dword [esp + 0xa8]
test eax, eax
mov word [esp + 0x28], bx
mov byte [esp + 0x2c], dl
je 0x427c28
cmp byte [eax], 0
je 0x427c28
push 0x20
push eax
lea eax, [esp + 0x35]
push eax
call fcn.00489d2e
add esp, 0xc
jmp 0x427c4c
push str.USER
call fcn.004b7122
add esp, 4
test eax, eax
jne 0x427c3e
mov eax, str.mysql
push eax
lea ecx, [esp + 0x31]
push ecx
call fcn.00489da6
add esp, 8
cmp dword [ebp + 0x140], 9
mov eax, dword [esp + 0xac]
sete dl
lea ecx, [esp + 0x2d]
push edx
push eax
lea eax, [ebp + 0x1dc]
push eax
push ecx
call fcn.00489c3e
add esp, 4
inc eax
push eax
call fcn.00431830
add esp, 0x10
test edi, edi
mov esi, eax
je 0x427c9e
push edi
inc esi
push esi
call fcn.00489da6
push 0x10
push edi
mov esi, eax
call fcn.004800e0
add esp, 0x10
mov dword [ebp + 0x130], eax
lea edx, [esp + 0x28]
sub esi, edx
push esi
lea eax, [esp + 0x2c]
push eax
push ebp
call fcn.0042bcc0
add esp, 0xc
test eax, eax
jne 0x427d36
push ebp
call fcn.0042bc90
add esp, 4
test eax, eax
jne 0x427d36
push ebp
call fcn.004272a0
cmp eax, 0xffffffff
je 0x427d36
test bl, 0x20
je 0x427cdb
mov byte [ebp + 0xf6], 1
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x8c
ret 0x20
mov dword [ebp + 0xe4], 0x7d8
mov ecx, dword [str.MySQL_client_run_out_of_memory]
push ecx
lea edx, [ebp + 0x1c]
push edx
call fcn.00489da6
add esp, 8
jmp 0x427d36
mov eax, dword [ebp]
push eax
call fcn.00473b20
mov dword [ebp], 0
mov dword [ebp + 0xe4], 0x7d8
mov ecx, dword [str.MySQL_client_run_out_of_memory]
push ecx
lea edx, [ebp + 0x1c]
push edx
call fcn.00489da6
add esp, 0xc
mov bl, byte [ebp + 0x18c]
push ebp
call fcn.004273b0
add esp, 4
push ebp
mov byte [ebp + 0x18c], 0
call fcn.00427dc0
pop edi
pop esi
mov byte [ebp + 0x18c], bl
pop ebp
xor eax, eax
pop ebx
add esp, 0x8c
ret 0x20