Function at 0x40a320
Capabilities:
Create tcp socket
Create udp socket
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
sub esp, 0x99c
mov eax, dword [0x5f1cf8]
xor eax, esp
mov dword [esp + 0x998], eax
mov eax, dword [esp + 0x9b8]
mov ecx, dword [esp + 0x9a4]
push ebx
mov ebx, dword [esp + 0x9b0]
push ebp
mov ebp, dword [esp + 0x9a8]
push esi
mov esi, dword [esp + 0x9b4]
xor edx, edx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x328]
cmp eax, edx
push edi
mov edi, dword [esp + 0x9c0]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x30], esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x20], edx
mov dword [ebp + 0x3b0], 0x4dd2b8
mov dword [ebp], edx
mov dword [ebp + 0x2dc], edx
jne 0x40a3aa
cmp dword [ebp + 0x32c], edx
je 0x40a3eb
cmp eax, edx
jne 0x40a3aa
mov eax, 0x4beef0
mov ecx, dword [ebp + 0x32c]
push ecx
push eax
lea edx, [ebp + 0x2f8]
push edx
call fcn.00408540
mov eax, dword [ebp + 0x328]
push eax
call fcn.0040b780
mov ecx, dword [ebp + 0x32c]
push ecx
call fcn.0040b780
mov ecx, dword [esp + 0x24]
add esp, 0x14
xor eax, eax
mov dword [ebp + 0x32c], eax
mov dword [ebp + 0x328], eax
test ecx, ecx
je 0x40a3f4
cmp byte [ecx], 0
jne 0x40a3fe
mov edx, dword [ebp + 0x310]
mov dword [esp + 0x10], edx
test esi, esi
je 0x40a407
cmp byte [esi], 0
jne 0x40a41d
mov eax, dword [ebp + 0x314]
test eax, eax
mov dword [esp + 0x30], eax
jne 0x40a41d
mov dword [esp + 0x30], 0x4bf01e
test ebx, ebx
jne 0x40a44c
mov eax, dword [ebp + 0x318]
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x40a44c
push str.MYSQL_PWD
call fcn.00465ab7
add esp, 4
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x40a44c
mov dword [esp + 0x1c], 0x4bf01e
test edi, edi
je 0x40a455
cmp byte [edi], 0
jne 0x40a45f
mov eax, dword [ebp + 0x320]
mov dword [esp + 0x28], eax
cmp dword [esp + 0x9c4], 0
jne 0x40a476
mov ecx, dword [ebp + 0x304]
mov dword [esp + 0x9c4], ecx
cmp dword [esp + 0x14], 0
jne 0x40a487
mov edx, dword [ebp + 0x31c]
mov dword [esp + 0x14], edx
mov eax, dword [ebp + 0x308]
test eax, eax
mov dword [ebp + 0x2ec], 2
mov ebx, 4
je 0x40a4a4
cmp eax, ebx
jne 0x40a523
cmp dword [esp + 0x10], 0
je 0x40a4bf
mov esi, dword [esp + 0x10]
mov edi, str.localhost
mov ecx, 0xa
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x40a523
mov ecx, dword [ebp + 0x2f8]
push ecx
push ebp
push ebp
call fcn.00407f10
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40a4ec
cmp dword [ebp + 0x308], ebx
je 0x40b086
push ebp
call fcn.00407cc0
add esp, 4
jmp 0x40a523
mov eax, dword [ebp + 0x34c]
push eax
mov dword [ebp + 0x308], ebx
mov dword [esp + 0x14], eax
mov eax, dword [str.Shared_memory:___.100s]
lea edx, [esp + 0x58]
push eax
mov ecx, edx
push 0x153
push ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], edx
call fcn.00415090
add esp, 0x10
mov eax, dword [ebp]
test eax, eax
jne 0x40a82f
mov ebx, 3
cmp dword [ebp + 0x308], ebx
je 0x40a581
cmp dword [esp + 0x10], eax
je 0x40a555
mov esi, dword [esp + 0x10]
mov edi, 0x4c08f0
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40a581
cmp byte [0x62bc0c], 0
jne 0x40a617
cmp dword [esp + 0x14], 0
jne 0x40a581
cmp dword [esp + 0x10], 0
jne 0x40a617
call fcn.00408400
test al, al
je 0x40a617
mov edx, dword [ebp + 0x2f8]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
push ebp
call fcn.00407d30
add esp, 0x10
cmp eax, 0xffffffff
jne 0x40a5ec
cmp dword [ebp + 0x308], ebx
je 0x40b086
cmp dword [esp + 0x10], 0
je 0x40a5cb
mov esi, dword [esp + 0x10]
mov edi, 0x4c08f0
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40b086
cmp dword [esp + 0x14], 0
je 0x40a617
mov esi, dword [esp + 0x14]
mov edi, str.MySQL
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40b086
jmp 0x40a617
push eax
call fcn.004153d0
mov ecx, dword [esp + 0x18]
mov dword [ebp], eax
mov edx, dword [str.Named_pipe:___.32s]
push ecx
push edx
lea eax, [esp + 0x60]
push 0x153
push eax
mov dword [esp + 0x34], eax
call fcn.00415090
add esp, 0x14
mov eax, dword [ebp]
test eax, eax
jne 0x40a82f
mov eax, dword [ebp + 0x308]
test eax, eax
je 0x40a635
cmp eax, 1
jne 0x40a818
or edi, 0xffffffff
cmp dword [esp + 0x9c4], 0
mov dword [esp + 0x14], 0
jne 0x40a657
mov ecx, dword [0x62bbe0]
mov dword [esp + 0x9c4], ecx
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x40a668
mov ebx, str.localhost
mov dword [esp + 0x10], ebx
mov eax, dword [str.__.100s_via_TCP_IP]
push ebx
lea edx, [esp + 0x58]
push eax
mov ecx, edx
push 0x153
push ecx
mov dword [esp + 0x30], edx
call fcn.00415090
add esp, 0x10
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a6bf
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edx, dword [str.Cant_create_TCP_IP_socket___d_]
push eax
mov eax, dword [str.HY000]
push edx
push eax
mov eax, 0x7d4
mov ecx, ebp
call fcn.00407cf0
jmp 0x40b083
push 2
push 1
push esi
call fcn.00415350
mov ecx, dword [esp + 0x9d0]
mov dword [ebp], eax
xor eax, eax
add esp, 0xc
mov dword [esp + 0x44], eax
push ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov word [esp + 0x48], 2
call dword [sym.imp.WSOCK32.dll_htons]
push ebx
mov word [esp + 0x4a], ax
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x40a729
mov edx, dword [ebp + 0x2f8]
push edx
mov dword [esp + 0x4c], eax
push 0x10
lea eax, [esp + 0x4c]
push eax
push esi
call fcn.00407c40
add esp, 0x10
mov edi, eax
jmp 0x40a7bd
lea ecx, [esp + 0x2c]
push ecx
push 0x800
lea edx, [esp + 0x1b0]
push edx
lea eax, [esp + 0x40]
push eax
push ebx
call fcn.0041b400
add esp, 0x14
test eax, eax
mov dword [esp + 0x24], eax
je 0x40a7eb
cmp word [eax + 8], 2
jne 0x40a7eb
xor ebx, ebx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 0xc]
cmp dword [ebx + edx], 0
lea eax, [ebx + edx]
je 0x40a7b4
movzx ecx, word [ecx + 0xa]
cmp cx, 4
jbe 0x40a783
mov ecx, 4
jmp 0x40a786
movsx ecx, cx
mov eax, dword [eax]
push ecx
push eax
lea ecx, [esp + 0x50]
push ecx
call fcn.00466080
mov edx, dword [ebp + 0x2f8]
push edx
push 0x10
lea eax, [esp + 0x58]
push eax
push esi
call fcn.00407c40
mov edi, eax
add esp, 0x1c
add ebx, 4
test edi, edi
jne 0x40a762
call fcn.0041b430
mov ebx, dword [esp + 0x10]
test edi, edi
je 0x40a818
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ecx, dword [str.Cant_connect_to_MySQL_server_on___.100s___d_]
mov edx, dword [str.HY000]
push eax
push ebx
push ecx
push edx
mov eax, 0x7d3
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
call fcn.0041b430
mov eax, dword [esp + 0x2c]
mov ecx, dword [str.Unknown_MySQL_server_host___.100s___d_]
mov edx, dword [str.HY000]
push eax
push ebx
push ecx
push edx
mov eax, 0x7d5
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
mov eax, dword [ebp]
test eax, eax
jne 0x40a82f
mov eax, dword [str.HY000]
push eax
push 0x7ff
jmp 0x40b07d
push eax
push ebp
call fcn.00419150
add esp, 8
test al, al
mov eax, dword [ebp]
je 0x40a867
mov ecx, dword [eax + 0x60]
push eax
call ecx
mov dword [ebp], 0
mov edx, dword [str.HY000]
push edx
push 0x7d8
push ebp
call fcn.00407c60
add esp, 0x10
jmp 0x40b086
push 1
push eax
mov eax, dword [eax + 0x78]
call eax
mov eax, dword [ebp + 0x2fc]
add esp, 8
test eax, eax
je 0x40a886
push eax
push ebp
call fcn.004197b0
add esp, 8
mov eax, dword [ebp + 0x300]
test eax, eax
je 0x40a89a
push eax
push ebp
call fcn.004197e0
add esp, 8
mov eax, dword [ebp + 0x350]
test eax, eax
je 0x40a8a7
mov dword [ebp + 0x2c], eax
mov eax, dword [ebp + 0x2f8]
test eax, eax
mov dword [ebp + 0x2e4], 0xa
je 0x40a8fa
mov ecx, dword [ebp]
push eax
push ecx
call fcn.0041b010
add esp, 8
test al, al
je 0x40a8fa
call fcn.004654a0
mov edx, dword [eax]
mov eax, dword [str.Lost_connection_to_MySQL_server_at__s__system_error:__d]
mov ecx, dword [str.HY000]
push edx
push str.waiting_for_initial_communication_packet
push eax
push ecx
mov eax, 0x7dd
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
push ebp
call fcn.00409e80
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
jne 0x40a945
cmp dword [ebp + 0x58], 0x7dd
jne 0x40b086
call fcn.004654a0
mov edx, dword [eax]
mov eax, dword [str.Lost_connection_to_MySQL_server_at__s__system_error:__d]
mov ecx, dword [str.HY000]
push edx
push str.reading_initial_communication_packet
push eax
push ecx
mov eax, 0x7dd
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
mov eax, dword [ebp + 0x10]
movzx ecx, byte [eax]
cmp ecx, 0xa
mov dword [ebp + 0x2e4], ecx
je 0x40a97a
mov edx, dword [str.Protocol_mismatch__server_version___d__client_version___d]
mov eax, dword [str.HY000]
push 0xa
push ecx
push edx
push eax
mov eax, 0x7d7
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
add eax, 1
push eax
call fcn.00412af0
mov esi, eax
mov ecx, dword [esi + 1]
push 8
add esi, 5
lea eax, [ebp + 0x386]
push esi
push eax
mov dword [ebp + 0x2d0], ecx
call fcn.00412490
mov ecx, dword [ebp + 0x10]
add esi, 9
mov eax, esi
sub eax, ecx
lea edx, [eax + 1]
add esp, 0x10
cmp edi, edx
jb 0x40a9bd
movzx edx, word [esi]
mov dword [ebp + 0x2e0], edx
add eax, 0x12
cmp edi, eax
jb 0x40a9d8
movsx eax, byte [esi + 2]
mov dword [ebp + 0x2f0], eax
movzx edx, word [esi + 3]
mov dword [ebp + 0x2ec], edx
add esi, 0x12
mov eax, esi
sub eax, ecx
add eax, 0xd
cmp edi, eax
jb 0x40a9fa
push 0xc
lea ecx, [ebp + 0x38e]
push esi
push ecx
call fcn.00412490
add esp, 0xc
jmp 0x40aa04
and dword [ebp + 0x2e0], 0xffff7fff
cmp byte [ebp + 0x364], 0
je 0x40aa32
mov edx, dword [esp + 0x1c]
cmp byte [edx], 0
je 0x40aa32
test dword [ebp + 0x2e0], 0x8000
jne 0x40aa32
mov eax, dword [str.HY000]
push eax
push 0x801
jmp 0x40b07d
push ebp
call fcn.00409090
add esp, 4
test eax, eax
jne 0x40b086
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40aa64
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40aa50
sub eax, edx
add eax, 1
mov dword [esp + 0x24], eax
jmp 0x40aa6c
mov dword [esp + 0x24], 1
mov eax, dword [esp + 0x10]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40aa73
sub eax, edx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x20]
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x40aa90
sub esi, dword [ebp + 0x10]
push 0
push esi
sub eax, ecx
lea ecx, [ebp + 0x280]
push ecx
mov ecx, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x3c]
lea ebx, [ebp + 0x27c]
push ebx
add ecx, 1
push ecx
lea edx, [ebp + 0x270]
push edx
add eax, 1
push eax
lea edi, [ebp + 0x284]
push edi
push 0
call fcn.0041ac40
add esp, 0x28
test eax, eax
je 0x40b071
mov esi, dword [esp + 0x30]
push 0
push esi
call fcn.0040b7d0
add esp, 8
test eax, eax
mov dword [ebp + 0x274], eax
je 0x40b071
mov edx, dword [esp + 0x1c]
push 0
push edx
call fcn.0040b7d0
add esp, 8
test eax, eax
mov dword [ebp + 0x278], eax
je 0x40b071
mov eax, dword [esp + 0x20]
mov ecx, dword [edi]
push eax
push ecx
call fcn.0040bba0
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 0x270]
push edx
push eax
call fcn.0040bba0
mov eax, dword [esp + 0x24]
add esp, 0x10
test eax, eax
je 0x40ab51
mov ecx, dword [ebx]
push eax
push ecx
call fcn.0040bba0
add esp, 8
jmp 0x40ab57
mov dword [ebx], 0
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x280]
add edx, 1
push edx
push eax
call fcn.0040bba0
mov ecx, dword [esp + 0x9cc]
mov edx, dword [ebp + 0x30c]
mov dword [ebp + 0x2d8], ecx
mov ecx, dword [esp + 0x9d4]
or edx, 0xa205
or ecx, edx
add esp, 8
test ecx, 0x10000
je 0x40ab9d
or ecx, 0x20000
cmp dword [ebp + 0x338], 0
jne 0x40abca
cmp dword [ebp + 0x33c], 0
jne 0x40abca
cmp dword [ebp + 0x340], 0
jne 0x40abca
cmp dword [ebp + 0x344], 0
jne 0x40abca
cmp dword [ebp + 0x348], 0
je 0x40abd1
mov byte [ebp + 0x354], 1
cmp byte [ebp + 0x354], 0
je 0x40abe0
or ecx, 0x800
cmp dword [esp + 0x28], 0
je 0x40abea
or ecx, 8
mov eax, dword [ebp + 0x2e0]
or eax, 0xfffff5df
and ecx, eax
test ecx, 0x200
mov dword [esp + 0x9cc], ecx
je 0x40ac42
mov edx, dword [ebp + 0x2c]
mov eax, dword [ebp + 0x290]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], edx
mov dl, byte [eax]
xor eax, eax
mov byte [esp + 0x5c], dl
mov dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
mov dword [esp + 0x65], eax
mov dword [esp + 0x69], eax
mov dword [esp + 0x6d], eax
mov word [esp + 0x71], ax
mov byte [esp + 0x73], al
lea ebx, [esp + 0x74]
jmp 0x40ac65
mov al, byte [ebp + 0x2c]
mov byte [esp + 0x56], al
mov eax, dword [ebp + 0x2c]
mov edx, eax
shr edx, 8
shr eax, 0x10
mov word [esp + 0x54], cx
mov byte [esp + 0x57], dl
mov byte [esp + 0x58], al
lea ebx, [esp + 0x59]
test ecx, 0x800
mov dword [ebp + 0x2dc], ecx
je 0x40ad76
lea ecx, [esp + 0x54]
mov eax, ebx
sub eax, ecx
push eax
mov edx, ecx
push edx
push ebp
call fcn.00419930
add esp, 0xc
test al, al
jne 0x40ad47
push ebp
call fcn.00419810
add esp, 4
test al, al
jne 0x40ad47
mov eax, dword [ebp + 0x348]
mov ecx, dword [ebp + 0x344]
mov edx, dword [ebp + 0x340]
push eax
mov eax, dword [ebp + 0x33c]
push ecx
mov ecx, dword [ebp + 0x338]
push edx
push eax
push ecx
call fcn.0041ab60
add esp, 0x14
test eax, eax
jne 0x40ace5
mov edx, dword [str.HY000]
push edx
push 0x7ea
jmp 0x40b07d
mov ecx, dword [ebp + 0x2f8]
mov edx, dword [ebp]
push ecx
push edx
push eax
mov dword [ebp + 0x26c], eax
call fcn.0041a870
add esp, 0xc
test eax, eax
je 0x40ad13
mov eax, dword [str.HY000]
push eax
push 0x7ea
jmp 0x40b07d
test dword [esp + 0x9cc], 0x40000000
je 0x40ad76
mov ecx, dword [ebp]
mov edi, dword [ebp + 0x270]
push ecx
call fcn.00408f80
add esp, 4
test eax, eax
je 0x40ad76
mov edx, dword [str.HY000]
push edx
push 0x7ea
jmp 0x40b07d
call fcn.004654a0
mov eax, dword [eax]
mov ecx, dword [str.Lost_connection_to_MySQL_server_at__s__system_error:__d]
mov edx, dword [str.HY000]
push eax
push str.sending_connection_information_to_server
push ecx
push edx
mov eax, 0x7dd
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
test esi, esi
je 0x40ad8d
cmp byte [esi], 0
je 0x40ad8d
push 0x30
push esi
push ebx
call fcn.00412490
add esp, 0xc
jmp 0x40ad96
push ebx
call fcn.0040c1d0
add esp, 4
push ebx
call fcn.00412af0
mov ebx, dword [esp + 0x20]
mov esi, eax
add esp, 4
add esi, 1
cmp byte [ebx], 0
je 0x40ade3
test dword [ebp + 0x2e0], 0x8000
push ebx
lea eax, [ebp + 0x386]
push eax
je 0x40add5
mov byte [esi], 0x14
add esi, 1
push esi
call fcn.0041a3f0
add esp, 0xc
add esi, 0x14
jmp 0x40ade9
push esi
call fcn.00419e30
add esp, 0xc
add esi, 9
jmp 0x40ade9
mov byte [esi], 0
add esi, 1
mov edi, dword [esp + 0x28]
test edi, edi
je 0x40ae1e
test byte [ebp + 0x2e0], 8
je 0x40ae1e
push 0xc0
push edi
push esi
call fcn.00412490
add eax, 1
push 0x10
push edi
mov esi, eax
call fcn.0040b7d0
add esp, 0x14
mov dword [ebp + 0x28c], eax
xor edi, edi
lea eax, [esp + 0x54]
sub esi, eax
push esi
mov ecx, eax
push ecx
push ebp
call fcn.00419930
add esp, 0xc
test al, al
jne 0x40b046
push ebp
call fcn.00419810
add esp, 4
test al, al
jne 0x40b046
push ebp
call fcn.00409e80
add esp, 4
cmp eax, 0xffffffff
jne 0x40ae93
cmp dword [ebp + 0x58], 0x7dd
jne 0x40b086
call fcn.004654a0
mov edx, dword [eax]
mov eax, dword [str.Lost_connection_to_MySQL_server_at__s__system_error:__d]
mov ecx, dword [str.HY000]
push edx
push str.reading_authorization_packet
push eax
push ecx
mov eax, 0x7dd
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
cmp eax, 1
jne 0x40af62
mov edx, dword [ebp + 0x10]
cmp byte [edx], 0xfe
jne 0x40af62
test dword [ebp + 0x2e0], 0x8000
je 0x40af62
push ebx
lea eax, [ebp + 0x386]
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.00419e30
push 9
lea ecx, [esp + 0x64]
push ecx
push ebp
call fcn.00419930
add esp, 0x18
test al, al
jne 0x40af34
push ebp
call fcn.00419810
add esp, 4
test al, al
jne 0x40af34
push ebp
call fcn.00409e80
add esp, 4
cmp eax, 0xffffffff
jne 0x40af62
cmp dword [ebp + 0x58], 0x7dd
jne 0x40b086
call fcn.004654a0
mov edx, dword [eax]
mov eax, dword [str.Lost_connection_to_MySQL_server_at__s__system_error:__d]
mov ecx, dword [str.HY000]
push edx
push str.reading_final_connect_information
push eax
push ecx
mov eax, 0x7dd
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
call fcn.004654a0
mov edx, dword [eax]
mov eax, dword [str.Lost_connection_to_MySQL_server_at__s__system_error:__d]
mov ecx, dword [str.HY000]
push edx
push str.sending_password_information
push eax
push ecx
mov eax, 0x7dd
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
test byte [esp + 0x9cc], 0x20
je 0x40af70
mov byte [ebp + 0x50], 1
test edi, edi
je 0x40afba
push edi
push ebp
call fcn.004092a0
test eax, eax
je 0x40afba
cmp dword [ebp + 0x58], 0x7dd
jne 0x40b086
call fcn.004654a0
mov edx, dword [eax]
mov eax, dword [str.Lost_connection_to_MySQL_server_at__s__system_error:__d]
mov ecx, dword [str.HY000]
push edx
push str.Setting_intital_database
push eax
push ecx
mov eax, 0x7dd
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
mov eax, dword [ebp + 0x324]
test eax, eax
je 0x40b02f
mov esi, dword [eax]
mov edx, dword [eax + 4]
mov al, byte [ebp + 0x385]
lea ebx, [esi + edx*4]
cmp esi, ebx
mov byte [esp + 0x1b], al
mov byte [ebp + 0x385], 0
jae 0x40b025
mov edx, dword [esi]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40afe8
sub eax, edi
push eax
push edx
push ebp
call fcn.004095f0
test eax, eax
jne 0x40b086
cmp dword [ebp + 0x294], eax
je 0x40b01e
push ebp
call fcn.00409770
add esp, 4
test eax, eax
je 0x40b086
push eax
call fcn.00408430
add esi, 4
cmp esi, ebx
jb 0x40afe1
mov cl, byte [esp + 0x1b]
mov byte [ebp + 0x385], cl
cmp byte [ebp + 0x357], 0
je 0x40b042
push ebp
call fcn.004107c0
test al, al
jne 0x40b086
mov eax, ebp
jmp 0x40b0ac
call fcn.004654a0
mov edx, dword [eax]
mov eax, dword [str.Lost_connection_to_MySQL_server_at__s__system_error:__d]
mov ecx, dword [str.HY000]
push edx
push str.sending_authentication_information
push eax
push ecx
mov eax, 0x7dd
mov ecx, ebp
call fcn.00407cf0
add esp, 0x10
jmp 0x40b086
mov edx, dword [str.HY000]
push edx
push 0x7d8
push ebp
call fcn.00407c60
add esp, 0xc
push ebp
call fcn.00409d50
add esp, 4
mov esi, ebp
call fcn.00409400
test dword [esp + 0x9cc], 0x80000000
jne 0x40b0aa
mov eax, ebp
call fcn.00409310
xor eax, eax
mov ecx, dword [esp + 0x9a8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00463f56
add esp, 0x99c
ret 0x20