Function at 0x435550
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x8ec
push ebx
push ebp
mov ebp, dword [esp + 0x8f8]
mov dword [ebp], 0
mov eax, dword [0x5f5f90]
mov dword [ebp + 0x148], eax
mov eax, dword [esp + 0x90c]
test eax, eax
push esi
push edi
jne 0x435589
mov dword [esp + 0x914], 0xcea
mov eax, dword [esp + 0x918]
test eax, eax
jne 0x4355a0
mov eax, str._tmp_mysql.sock
mov dword [esp + 0x918], eax
mov ecx, dword [ebp + 0x1ac]
test ecx, ecx
mov ebx, dword [esp + 0x920]
mov byte [ebp + 0x205], 1
mov dword [ebp + 0x1a4], 2
jne 0x4355c8
mov dword [ebp + 0x1ac], ebx
test eax, eax
jne 0x435636
mov edi, dword [esp + 0x904]
test edi, edi
jne 0x4355eb
call fcn.00435d20
test al, al
jne 0x435636
mov edi, dword [esp + 0x904]
test edi, edi
je 0x43561f
mov esi, 0x5daa90
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x435616
test cl, cl
je 0x435612
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x435616
add eax, 2
add esi, 2
test cl, cl
jne 0x4355f2
xor eax, eax
jmp 0x43561b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x435636
mov al, byte [ebp + 0x1fa]
test al, al
jne 0x435636
mov al, byte [0x6312f4]
test al, al
jne 0x4357aa
mov edx, dword [ebp + 0x1ac]
lea eax, [esp + 0x918]
push eax
lea ecx, [esp + 0x908]
push ecx
push edx
push ebp
call fcn.00434f40
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4356fa
mov al, byte [ebp + 0x1fa]
test al, al
jne 0x435cef
mov edi, dword [esp + 0x904]
test edi, edi
je 0x4356b0
mov esi, 0x5daa90
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4356a3
test cl, cl
je 0x43569f
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4356a3
add eax, 2
add esi, 2
test cl, cl
jne 0x43567f
xor eax, eax
jmp 0x4356a8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x435cef
mov eax, dword [esp + 0x918]
test eax, eax
je 0x4357aa
mov esi, str.MySQL
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4356e8
test cl, cl
je 0x4356e4
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4356e8
add eax, 2
add esi, 2
test cl, cl
jne 0x4356c4
xor eax, eax
jmp 0x4356ed
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4357aa
jmp 0x435cef
push eax
call fcn.00498cb0
mov ecx, dword [esp + 0x908]
mov dword [ebp], eax
mov eax, dword [esp + 0x91c]
mov edx, dword [str.__.100s_via_named_pipe]
add esp, 4
push eax
push ecx
push edx
lea eax, [esp + 0x34]
push eax
call fcn.005992f9
add esp, 0x10
mov eax, dword [ebp]
test eax, eax
je 0x435cc5
push eax
push ebp
call fcn.0043b080
add esp, 8
test eax, eax
jne 0x435cc5
mov ecx, dword [ebp]
push 1
push ecx
call fcn.00498a30
mov edx, dword [0x6273f0]
mov eax, dword [ebp + 0x1ac]
add esp, 8
test eax, eax
mov dword [ebp + 0x30], edx
mov dword [ebp + 0x19c], 0xa
je 0x435958
push eax
mov eax, dword [ebp]
push eax
call fcn.00498bd0
add esp, 8
test al, al
je 0x435958
mov dword [ebp + 0x20], 0x7dd
mov ecx, dword [str.Lost_connection_to_MySQL_server_during_query]
push ecx
lea edx, [ebp + 0x3c]
push edx
call fcn.004d5a76
add esp, 8
jmp 0x435cef
test edi, edi
mov dword [esp + 0x918], 0
jne 0x4357c5
mov edi, str.localhost
mov dword [esp + 0x904], edi
mov ecx, dword [str.__.100s_via_TCP_IP]
push edi
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.005992f9
lea eax, [esp + 0xe8]
push eax
lea ecx, [esp + 0x20]
push ebx
push ecx
mov dword [esp + 0x28], 0
call fcn.004cf240
add esp, 0x18
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
lea edx, [esp + 0x10]
push edx
mov ebx, eax
call fcn.004cf290
add esp, 4
cmp ebx, 0xffffffff
jne 0x43583a
mov dword [ebp + 0x20], 0x7d4
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax*4 + 0x5d75e0]
push ecx
lea edx, [ebp + 0x3c]
push edx
call fcn.005992f9
jmp 0x435cec
push 0
push 1
push ebx
call fcn.00498c50
mov ecx, dword [esp + 0x910]
mov dword [ebp], eax
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
add esp, 0xc
mov dword [esp + 0x1c], eax
push ecx
mov dword [esp + 0x24], eax
mov word [esp + 0x18], 2
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
je 0x43587b
mov dword [esp + 0x18], eax
jmp 0x4358fa
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x908]
push 0x800
lea eax, [esp + 0x104]
push eax
lea ecx, [esp + 0xf8]
push ecx
push edx
call fcn.004cf1f0
add esp, 0x14
test eax, eax
jne 0x4358da
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x904]
push eax
mov dword [ebp + 0x20], 0x7d5
mov edx, dword [str.Unknown_MySQL_Server_Host___.100s___d_]
push ecx
push edx
lea eax, [ebp + 0x3c]
push eax
call fcn.005992f9
add esp, 0x10
call fcn.004cf220
jmp 0x435cef
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]
call fcn.004cf220
mov ecx, dword [esp + 0x914]
push ecx
call sub.WSOCK32.dll_htons
mov edx, dword [ebp + 0x1ac]
push edx
mov word [esp + 0x1a], ax
push 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.00435d80
add esp, 0x10
test eax, eax
jge 0x43572a
mov dword [ebp + 0x20], 0x7d3
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, dword [esp + 0x904]
mov edx, dword [str.Cant_connect_to_MySQL_server_on___.100s___d_]
push eax
push ecx
push edx
lea eax, [ebp + 0x3c]
push eax
call fcn.005992f9
add esp, 0x10
jmp 0x435cef
push ebp
call fcn.004351e0
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x435cef
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xa
mov dword [ebp + 0x19c], ecx
je 0x4359a7
cmp ecx, 9
je 0x4359a7
push 0xa
mov eax, ecx
mov dword [ebp + 0x20], 0x7d7
mov ecx, dword [str.Protocol_mismatch._Server_Version___d_Client_Version___d]
push eax
push ecx
lea edx, [ebp + 0x3c]
push edx
call fcn.005992f9
add esp, 0x10
jmp 0x435cef
inc eax
push eax
call fcn.004d590e
mov esi, eax
mov eax, dword [esi + 1]
push 8
mov dword [ebp + 0x188], eax
add esi, 5
lea eax, [ebp + 0x206]
push esi
push eax
call fcn.004d59fe
mov ecx, dword [ebp + 0x10]
add esi, 9
mov edx, esi
sub edx, ecx
lea ecx, [edx + 1]
add esp, 0x10
cmp edi, ecx
jb 0x4359ea
xor eax, eax
mov ax, word [esi]
mov dword [ebp + 0x198], eax
lea ecx, [edx + 0x12]
cmp edi, ecx
jb 0x435a07
movsx eax, byte [esi + 2]
xor ecx, ecx
mov dword [ebp + 0x1a8], eax
mov cx, word [esi + 3]
mov dword [ebp + 0x1a4], ecx
mov ecx, dword [esp + 0x908]
test ecx, ecx
mov eax, 0x6244e8
jne 0x435a1e
mov dword [esp + 0x908], eax
mov ecx, dword [esp + 0x90c]
test ecx, ecx
jne 0x435a30
mov dword [esp + 0x90c], eax
mov edi, dword [esp + 0x918]
test edi, edi
je 0x435a46
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
jmp 0x435a4b
mov ecx, 1
push 0
push edx
lea eax, [ebp + 0x138]
push eax
push ecx
or ecx, 0xffffffff
lea edi, [ebp + 0x134]
push edi
mov edi, dword [esp + 0x918]
xor eax, eax
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 + 0x128]
push esi
not ecx
push ecx
lea ebx, [ebp + 0x13c]
push ebx
push eax
call fcn.004ca880
add esp, 0x28
test eax, eax
je 0x435ca9
mov edx, dword [esp + 0x908]
push 0
push edx
call fcn.004c6640
add esp, 8
test eax, eax
mov dword [ebp + 0x12c], eax
je 0x435ca9
mov eax, dword [esp + 0x90c]
push 0
push eax
call fcn.004c6640
add esp, 8
test eax, eax
mov dword [ebp + 0x130], eax
je 0x435ca9
mov edx, dword [ebx]
lea ecx, [esp + 0x28]
push ecx
push edx
call fcn.004d5a76
mov eax, dword [esp + 0x90c]
mov ecx, dword [esi]
push eax
push ecx
call fcn.004d5a76
mov eax, dword [esp + 0x928]
add esp, 0x10
test eax, eax
je 0x435b16
mov edx, dword [ebp + 0x134]
push eax
push edx
call fcn.004d5a76
add esp, 8
jmp 0x435b20
mov dword [ebp + 0x134], 0
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x138]
inc eax
push eax
push ecx
call fcn.004d5a76
mov eax, dword [ebp + 0x1b0]
mov ebx, dword [esp + 0x924]
mov edi, dword [esp + 0x918]
mov edx, dword [esp + 0x91c]
or eax, 0x85
add esp, 8
or ebx, eax
test edi, edi
mov dword [ebp + 0x190], edx
je 0x435b63
or ebx, 8
test byte [ebp + 0x198], 0x20
je 0x435b80
mov al, byte [ebp + 0x1f9]
test al, al
jne 0x435b7b
test bl, 0x20
je 0x435b80
or ebx, 0x20
jmp 0x435b83
and ebx, 0xffffffdf
mov eax, dword [ebp + 0x1c]
mov ecx, eax
mov byte [esp + 0x2a], al
shr eax, 0x10
mov byte [esp + 0x2c], al
mov eax, dword [esp + 0x908]
shr ecx, 8
test eax, eax
mov word [esp + 0x28], bx
mov dword [ebp + 0x194], ebx
mov byte [esp + 0x2b], cl
je 0x435bc7
cmp byte [eax], 0
je 0x435bc7
push 0x20
push eax
lea edx, [esp + 0x35]
push edx
call fcn.004d59fe
add esp, 0xc
jmp 0x435beb
push str.USER
call fcn.0059ade7
add esp, 4
test eax, eax
jne 0x435bdd
mov eax, str.mysql
push eax
lea eax, [esp + 0x31]
push eax
call fcn.004d5a76
add esp, 8
mov esi, dword [ebp + 0x19c]
mov edx, dword [esp + 0x90c]
cmp esi, 9
sete cl
lea eax, [ebp + 0x206]
push ecx
push edx
push eax
lea eax, [esp + 0x39]
push eax
call fcn.004d590e
add esp, 4
inc eax
push eax
call fcn.00441c20
add esp, 0x10
test edi, edi
mov esi, eax
je 0x435c41
push 0x40
push edi
inc esi
push esi
call fcn.004d59fe
push 0x10
push edi
mov esi, eax
call fcn.004c6640
add esp, 0x14
mov dword [ebp + 0x144], eax
lea ecx, [esp + 0x28]
sub esi, ecx
push esi
lea edx, [esp + 0x2c]
push edx
push ebp
call fcn.0043b220
add esp, 0xc
test eax, eax
jne 0x435c8e
push ebp
call fcn.0043b1e0
add esp, 4
test eax, eax
jne 0x435c8e
push ebp
call fcn.004351e0
add esp, 4
cmp eax, 0xffffffff
je 0x435cef
test bl, 0x20
je 0x435c81
mov byte [ebp + 0x106], 1
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x8ec
ret
mov dword [ebp + 0x20], 0x7dd
mov eax, dword [str.Lost_connection_to_MySQL_server_during_query]
push eax
lea ecx, [ebp + 0x3c]
push ecx
call fcn.004d5a76
add esp, 8
jmp 0x435cef
mov dword [ebp + 0x20], 0x7d8
mov edx, dword [str.MySQL_client_run_out_of_memory]
push edx
lea eax, [ebp + 0x3c]
push eax
call fcn.004d5a76
add esp, 8
jmp 0x435cef
mov ecx, dword [ebp]
push ecx
call fcn.00498930
mov dword [ebp], 0
mov dword [ebp + 0x20], 0x7d8
mov edx, dword [str.MySQL_client_run_out_of_memory]
push edx
lea eax, [ebp + 0x3c]
push eax
call fcn.004d5a76
add esp, 0xc
mov bl, byte [ebp + 0x204]
push ebp
call fcn.00435150
push ebp
mov byte [ebp + 0x204], 0
call fcn.00435da0
add esp, 8
pop edi
pop esi
mov byte [ebp + 0x204], bl
pop ebp
xor eax, eax
pop ebx
add esp, 0x8ec
ret