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

Disassembly:
sub esp, 0xae8
push ebx
push ebp
mov ebp, dword [esp + 0xaf4]
xor ebx, ebx
mov dword [ebp], ebx
mov eax, dword [ebp + 0x1d0]
cmp eax, ebx
push esi
push edi
jne 0x10005b11
cmp dword [ebp + 0x1d4], ebx
je 0x10005b4c
cmp eax, ebx
jne 0x10005b11
mov eax, 0x10034f74
mov ecx, dword [ebp + 0x1d4]
push ecx
push eax
lea edx, [ebp + 0x1ac]
push edx
call fcn.10006540
mov eax, dword [ebp + 0x1d0]
push eax
call sym.LIBMYSQL.dll_my_no_flags_free
mov ecx, dword [ebp + 0x1d4]
push ecx
call sym.LIBMYSQL.dll_my_no_flags_free
mov dword [ebp + 0x1d4], ebx
add esp, 0x14
mov dword [ebp + 0x1d0], ebx
mov edi, dword [esp + 0xb00]
cmp edi, ebx
je 0x10005b5c
cmp byte [edi], 0
jne 0x10005b69
mov edi, dword [ebp + 0x1b8]
mov dword [esp + 0xb00], edi
mov eax, dword [esp + 0xb04]
cmp eax, ebx
je 0x10005b79
cmp byte [eax], 0
jne 0x10005b86
mov edx, dword [ebp + 0x1c0]
mov dword [esp + 0xb04], edx
cmp dword [esp + 0xb08], ebx
jne 0x10005bbb
mov eax, dword [ebp + 0x1c4]
cmp eax, ebx
mov dword [esp + 0xb08], eax
jne 0x10005bbb
push str.MYSQL_PWD
call fcn.10013ecf
mov edi, dword [esp + 0xb04]
add esp, 4
mov dword [esp + 0xb08], eax
mov eax, dword [esp + 0xb0c]
cmp eax, ebx
je 0x10005bcb
cmp byte [eax], 0
jne 0x10005bd8
mov eax, dword [ebp + 0x1cc]
mov dword [esp + 0xb0c], eax
cmp dword [esp + 0xb10], ebx
jne 0x10005bee
mov ecx, dword [ebp + 0x1b4]
mov dword [esp + 0xb10], ecx
mov eax, dword [esp + 0xb14]
cmp eax, ebx
jne 0x10005c06
mov eax, dword [ebp + 0x1c8]
mov dword [esp + 0xb14], eax
cmp eax, ebx
mov byte [ebp + 0x205], 1
mov dword [ebp + 0x1a4], 2
jne 0x10005c7e
cmp edi, ebx
jne 0x10005c33
call fcn.100064e0
test al, al
jne 0x10005c7e
mov edi, dword [esp + 0xb00]
cmp edi, ebx
je 0x10005c67
mov esi, 0x10034ef0
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x10005c5e
test cl, cl
je 0x10005c5a
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x10005c5e
add eax, 2
add esi, 2
test cl, cl
jne 0x10005c3a
xor eax, eax
jmp 0x10005c63
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x10005c7e
mov al, byte [ebp + 0x1fa]
test al, al
jne 0x10005c7e
mov al, byte [0x1003a710]
test al, al
jne 0x10005de5
mov edx, dword [ebp + 0x1ac]
lea eax, [esp + 0xb14]
push eax
lea ecx, [esp + 0xb04]
push ecx
push edx
push ebp
call fcn.10004ee0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10005d42
mov al, byte [ebp + 0x1fa]
test al, al
jne 0x10005dc7
mov edi, dword [esp + 0xb00]
cmp edi, ebx
je 0x10005cf8
mov esi, 0x10034ef0
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x10005ceb
test cl, cl
je 0x10005ce7
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x10005ceb
add eax, 2
add esi, 2
test cl, cl
jne 0x10005cc7
xor eax, eax
jmp 0x10005cf0
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x10005dc7
mov eax, dword [esp + 0xb14]
cmp eax, ebx
je 0x10005de5
mov esi, str.MySQL
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x10005d30
test cl, cl
je 0x10005d2c
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x10005d30
add eax, 2
add esi, 2
test cl, cl
jne 0x10005d0c
xor eax, eax
jmp 0x10005d35
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x10005de5
jmp 0x10005dc7
push eax
call fcn.1000d120
mov edx, dword [esp + 0xb18]
push edx
mov dword [ebp], eax
mov eax, dword [esp + 0xb08]
mov ecx, dword [str.__.100s_via_named_pipe]
push eax
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.1001397e
add esp, 0x14
mov eax, dword [ebp]
test eax, eax
je 0x10006453
push eax
push ebp
call fcn.1000bcb0
add esp, 8
test eax, eax
jne 0x10006453
mov ecx, dword [ebp]
push 1
push ecx
call fcn.1000d270
mov eax, dword [ebp + 0x1ac]
add esp, 8
test eax, eax
mov dword [ebp + 0x19c], 0xa
je 0x10005f7c
mov edx, dword [ebp]
push eax
push edx
call fcn.1000d360
add esp, 8
test al, al
je 0x10005f7c
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 sym.LIBMYSQL.dll_strmov
add esp, 8
jmp 0x1000647d
cmp dword [esp + 0xb10], ebx
mov dword [esp + 0xb14], ebx
jne 0x10005e01
mov eax, dword [0x1003a6ec]
mov dword [esp + 0xb10], eax
cmp edi, ebx
jne 0x10005e11
mov edi, str.localhost
mov dword [esp + 0xb00], edi
mov ecx, dword [str.__.100s_via_TCP_IP]
push edi
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.1001397e
add esp, 0xc
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10005e5e
mov dword [ebp + 0x20], 0x7d4
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax*4 + 0x100323b0]
push ecx
lea edx, [ebp + 0x3c]
push edx
call fcn.1001397e
jmp 0x1000647a
push 0
push 1
push ebx
call fcn.1000d0c0
mov ecx, dword [esp + 0xb0c]
mov dword [ebp], eax
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
add esp, 0xc
mov dword [esp + 0x18], eax
push ecx
mov dword [esp + 0x20], eax
mov word [esp + 0x14], 2
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
je 0x10005e9f
mov dword [esp + 0x14], eax
jmp 0x10005f1e
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0xb04]
push 0x800
lea eax, [esp + 0x300]
push eax
lea ecx, [esp + 0xf4]
push ecx
push edx
call fcn.10009dd0
add esp, 0x14
test eax, eax
jne 0x10005efe
call fcn.10009e00
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xb00]
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.1001397e
add esp, 0x10
jmp 0x1000647d
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov esi, dword [edx]
mov eax, ecx
shr ecx, 2
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10009e00
mov ecx, dword [esp + 0xb10]
push ecx
call sub.WSOCK32.dll_htons
mov edx, dword [ebp + 0x1ac]
push edx
mov word [esp + 0x16], ax
push 0x10
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.10004ec0
add esp, 0x10
test eax, eax
jge 0x10005d6f
mov dword [ebp + 0x20], 0x7d3
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, dword [esp + 0xb00]
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.1001397e
add esp, 0x10
jmp 0x1000647d
push ebp
call fcn.100050e0
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
je 0x1000647d
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xa
mov dword [ebp + 0x19c], ecx
je 0x10005fc5
push 0xa
mov edx, ecx
mov dword [ebp + 0x20], 0x7d7
mov eax, dword [str.Protocol_mismatch._Server_Version___d_Client_Version___d]
push edx
push eax
lea ecx, [ebp + 0x3c]
push ecx
call fcn.1001397e
add esp, 0x10
jmp 0x1000647d
inc eax
push eax
call fcn.1000cb10
mov esi, eax
mov edx, dword [esi + 1]
push 8
add esi, 5
lea eax, [ebp + 0x206]
push esi
push eax
mov dword [ebp + 0x188], edx
call sym.LIBMYSQL.dll_strmake
mov edi, dword [ebp + 0x10]
add esi, 9
mov eax, esi
sub eax, edi
lea ecx, [eax + 1]
add esp, 0x10
cmp ebx, ecx
jb 0x10006008
xor edx, edx
mov dx, word [esi]
mov dword [ebp + 0x198], edx
add eax, 0x12
cmp ebx, eax
jb 0x10006025
movsx eax, byte [esi + 2]
xor ecx, ecx
mov dword [ebp + 0x1a8], eax
mov cx, word [esi + 3]
mov dword [ebp + 0x1a4], ecx
mov ebx, dword [ebp + 0x1dc]
test ebx, ebx
je 0x10006063
mov eax, dword [ebp + 0x1d8]
test eax, eax
mov edi, dword [0x1003a6ac]
je 0x10006044
mov dword [0x1003a6ac], eax
mov edx, dword [ebp + 0x1dc]
push 0x10
push edx
call fcn.10001c80
mov dword [ebp + 0x148], eax
add esp, 8
mov dword [0x1003a6ac], edi
jmp 0x100060b7
mov eax, dword [ebp + 0x1a8]
test eax, eax
je 0x100060ac
push eax
lea eax, [esp + 0x28]
push 0x10034f64
push eax
lea ebx, [esp + 0x30]
call fcn.1001397e
xor ecx, ecx
mov cl, byte [ebp + 0x1a8]
push 0
push ecx
call fcn.100017b0
add esp, 0x14
test eax, eax
mov dword [ebp + 0x148], eax
jne 0x100060b7
mov edx, dword [0x10034100]
mov dword [ebp + 0x148], edx
jmp 0x100060b7
mov eax, dword [0x10034100]
mov dword [ebp + 0x148], eax
mov eax, dword [ebp + 0x148]
test eax, eax
jne 0x10006133
mov eax, dword [ebp + 0x1d8]
test eax, eax
mov dword [ebp + 0x20], 0x7e3
je 0x100060f5
test ebx, ebx
jne 0x100060db
mov ebx, str.unknown
mov ecx, dword [str.Cant_initialize_character_set___.32s__path:___.100s_]
push eax
push ebx
push ecx
lea edx, [ebp + 0x3c]
push edx
call fcn.1001397e
add esp, 0x10
jmp 0x1000647d
lea eax, [esp + 0xf8]
push eax
call fcn.10001270
add esp, 4
test ebx, ebx
jne 0x1000610e
mov ebx, str.unknown
mov edx, dword [ebp + 0x20]
mov eax, dword [edx*4 + 0x100323b0]
lea ecx, [esp + 0xf8]
push ecx
push ebx
push eax
lea ecx, [ebp + 0x3c]
push ecx
call fcn.1001397e
add esp, 0x10
jmp 0x1000647d
mov ecx, dword [esp + 0xb04]
test ecx, ecx
mov eax, 0x1003a6d4
jne 0x1000614a
mov dword [esp + 0xb04], eax
mov ecx, dword [esp + 0xb08]
test ecx, ecx
jne 0x1000615c
mov dword [esp + 0xb08], eax
mov edi, dword [esp + 0xb14]
test edi, edi
je 0x10006172
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
jmp 0x10006177
mov ecx, 1
sub esi, dword [ebp + 0x10]
push 0
push esi
lea eax, [ebp + 0x138]
push eax
push ecx
or ecx, 0xffffffff
lea edi, [ebp + 0x134]
push edi
mov edi, dword [esp + 0xb14]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
or ecx, 0xffffffff
lea edi, [esp + 0x4c]
repne scasb al, byte es:[edi]
lea ebx, [ebp + 0x128]
push ebx
not ecx
push ecx
lea edx, [ebp + 0x13c]
push edx
push eax
call fcn.100095b0
add esp, 0x28
test eax, eax
je 0x10006437
mov esi, dword [esp + 0xb04]
push 0
push esi
call sym.LIBMYSQL.dll_my_strdup
add esp, 8
test eax, eax
mov dword [ebp + 0x12c], eax
je 0x10006437
mov edx, dword [esp + 0xb08]
push 0
push edx
call sym.LIBMYSQL.dll_my_strdup
add esp, 8
test eax, eax
mov dword [ebp + 0x130], eax
je 0x10006437
mov ecx, dword [ebp + 0x13c]
lea eax, [esp + 0x34]
push eax
push ecx
call sym.LIBMYSQL.dll_strmov
mov edx, dword [esp + 0xb08]
mov eax, dword [ebx]
push edx
push eax
call sym.LIBMYSQL.dll_strmov
mov eax, dword [esp + 0xb24]
add esp, 0x10
test eax, eax
je 0x10006249
mov ecx, dword [ebp + 0x134]
push eax
push ecx
call sym.LIBMYSQL.dll_strmov
add esp, 8
jmp 0x10006253
mov dword [ebp + 0x134], 0
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x138]
inc edx
push edx
push eax
call sym.LIBMYSQL.dll_strmov
mov edx, dword [ebp + 0x1b0]
mov ebx, dword [esp + 0xb20]
mov edi, dword [esp + 0xb14]
mov ecx, dword [esp + 0xb18]
or edx, 0x2005
add esp, 8
or ebx, edx
test edi, edi
mov dword [ebp + 0x190], ecx
je 0x10006297
or ebx, 8
test byte [ebp + 0x198], 0x20
je 0x100062b4
mov al, byte [ebp + 0x1f9]
test al, al
jne 0x100062af
test bl, 0x20
je 0x100062b4
or ebx, 0x20
jmp 0x100062b7
and ebx, 0xffffffdf
mov dword [ebp + 0x194], ebx
mov eax, dword [sym.LIBMYSQL.dll_max_allowed_packet]
mov ecx, eax
mov byte [esp + 0x36], al
shr ecx, 8
shr eax, 0x10
test esi, esi
mov word [esp + 0x34], bx
mov byte [esp + 0x37], cl
mov byte [esp + 0x38], al
je 0x100062f6
cmp byte [esi], 0
je 0x100062f6
push 0x20
lea edx, [esp + 0x3d]
push esi
push edx
call sym.LIBMYSQL.dll_strmake
add esp, 0xc
jmp 0x10006303
lea eax, [esp + 0x39]
push eax
call fcn.100064b0
add esp, 4
mov esi, dword [ebp + 0x19c]
mov edx, dword [esp + 0xb08]
cmp esi, 9
sete cl
lea eax, [ebp + 0x206]
push ecx
push edx
push eax
lea eax, [esp + 0x45]
push eax
call fcn.1000cb10
add esp, 4
inc eax
push eax
call fcn.1000c780
add esp, 0x10
test edi, edi
mov esi, eax
je 0x1000636d
test byte [ebp + 0x198], 8
je 0x1000636d
push 0x40
push edi
inc esi
push esi
call sym.LIBMYSQL.dll_strmake
push 0x10
push edi
mov esi, eax
call sym.LIBMYSQL.dll_my_strdup
add esp, 0x14
mov dword [ebp + 0x144], eax
mov dword [esp + 0xb0c], 0
lea ecx, [esp + 0x34]
sub esi, ecx
push esi
lea edx, [esp + 0x38]
push edx
push ebp
call fcn.1000be30
add esp, 0xc
test eax, eax
jne 0x10005dc7
push ebp
call fcn.1000bdf0
add esp, 4
test eax, eax
jne 0x10005dc7
push ebp
call fcn.100050e0
add esp, 4
cmp eax, 0xffffffff
je 0x1000647d
test bl, 0x20
je 0x100063b9
mov byte [ebp + 0x106], 1
mov eax, dword [ebp + 0x1f4]
test eax, eax
je 0x100063c6
mov dword [ebp + 0x1c], eax
mov eax, dword [esp + 0xb0c]
test eax, eax
je 0x100063e0
push eax
push ebp
call sym.LIBMYSQL.dll_mysql_select_db
test eax, eax
jne 0x1000647d
mov eax, dword [ebp + 0x1bc]
test eax, eax
je 0x10006414
mov bl, byte [ebp + 0x205]
push eax
push ebp
mov byte [ebp + 0x205], 0
call sym.LIBMYSQL.dll_mysql_query
test eax, eax
jne 0x1000647d
push ebp
call sym.LIBMYSQL.dll_mysql_use_result
push eax
call sym.LIBMYSQL.dll_mysql_free_result
mov byte [ebp + 0x205], bl
mov al, byte [ebp + 0x1fb]
test al, al
je 0x10006428
push ebp
call sym.LIBMYSQL.dll_mysql_rpl_probe
test eax, eax
jne 0x1000647d
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0xae8
ret 0x20
mov dword [ebp + 0x20], 0x7d8
mov edx, dword [str.MySQL_client_run_out_of_memory]
push edx
lea eax, [ebp + 0x3c]
push eax
call sym.LIBMYSQL.dll_strmov
add esp, 8
jmp 0x1000647d
mov ecx, dword [ebp]
push ecx
call fcn.1000d160
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 sym.LIBMYSQL.dll_strmov
add esp, 0xc
mov bl, byte [ebp + 0x204]
push ebp
call fcn.10005310
add esp, 4
push ebp
mov byte [ebp + 0x204], 0
call sym.LIBMYSQL.dll_mysql_close
pop edi
pop esi
mov byte [ebp + 0x204], bl
pop ebp
xor eax, eax
pop ebx
add esp, 0xae8
ret 0x20