Function at 0x40beb0
Capabilities:
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 0x14]
mov eax, dword [esi]
push edi
push 0x786de8
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [ecx]
lea ecx, [edx + eax*4]
mov edx, dword [esp + 0x1c]
push ecx
mov ecx, dword [edx]
sub ecx, eax
push ecx
call fcn.0040b0a0
add dword [esi], eax
add esp, 0x14
cmp dword [0x786de8], 0
jne 0x40bf00
push str.MYSQL_GROUP_SUFFIX
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [0x786de8], eax
mov esi, dword [esp + 0x18]
test esi, esi
je 0x40bf29
cmp byte [0x786de1], 0
jne 0x40bf29
mov edi, 0x786be0
call fcn.0040afa0
test eax, eax
jne 0x40c0b4
mov dword [0x786dec], edi
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40bf52
cmp byte [0x786de1], 0
jne 0x40bf52
mov edi, 0x7869e0
call fcn.0040afa0
test eax, eax
jne 0x40c0b4
mov dword [0x786de4], edi
mov eax, dword [0x786de8]
push ebx
push ebp
mov ebp, dword [esp + 0x24]
mov byte [0x786de1], 1
test eax, eax
je 0x40c04d
cmp ebp, 0x40b020
jne 0x40c04d
lea edx, [eax + 1]
jmp 0x40bf80
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40bf80
mov esi, dword [esp + 0x28]
mov ebx, dword [esi + 8]
mov ecx, dword [esi]
sub eax, edx
mov edx, dword [ebx]
mov ebp, eax
lea eax, [edx*8 + 4]
push eax
push ecx
call fcn.0041a0c0
mov ecx, eax
add esp, 8
mov dword [esp + 0x20], ecx
test ecx, ecx
je 0x40c043
xor edi, edi
cmp dword [ebx], edi
jbe 0x40c02d
inc ebp
mov dword [esp + 0x1c], ebp
mov edx, dword [ebx + 8]
mov eax, dword [edx + edi*4]
mov dword [ecx + edi*4], eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40bfd0
mov ecx, dword [esi]
sub eax, edx
mov ebp, eax
mov eax, dword [esp + 0x1c]
add eax, ebp
push eax
push ecx
call fcn.0041a0c0
mov esi, eax
add esp, 8
test esi, esi
je 0x40c043
mov edx, dword [ebx]
mov eax, dword [esp + 0x20]
add edx, edi
mov dword [eax + edx*4], esi
mov eax, dword [eax + edi*4]
push ebp
push eax
push esi
call sub.MSVCR90.dll_memcpy
mov ecx, dword [esp + 0x28]
mov edx, dword [0x786de8]
push ecx
push edx
add esi, ebp
push esi
call sub.MSVCR90.dll_memcpy
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
inc edi
add esp, 0x18
cmp edi, dword [ebx]
jb 0x40bfc0
mov eax, dword [ebx]
mov ebp, dword [esp + 0x24]
add eax, eax
mov dword [ebx], eax
mov dword [ebx + 8], ecx
mov dword [ecx + eax*4], 0
jmp 0x40c051
pop ebp
pop ebx
pop edi
mov eax, 2
pop esi
ret
mov esi, dword [esp + 0x28]
mov eax, dword [0x786de4]
test eax, eax
je 0x40c086
push 0
push eax
push 0x4852b2
push 0x4852b2
push esi
push ebp
call fcn.0040b4f0
add esp, 0x18
test eax, eax
jl 0x40c13d
jle 0x40c0b0
mov eax, dword [0x786de4]
push eax
jmp 0x40c125
mov edi, dword [esp + 0x14]
push edi
call fcn.00417db0
add esp, 4
test eax, eax
je 0x40c0b7
push esi
push ebp
xor ebx, ebx
call fcn.0040be50
add esp, 8
test eax, eax
jl 0x40c13d
jmp 0x40c0b0
pop ebp
xor eax, eax
pop ebx
pop edi
pop esi
ret
mov eax, dword [esp + 0x2c]
cmp dword [eax], 0
mov edi, eax
mov dword [esp + 0x20], eax
je 0x40c0b0
mov ebx, dword [edi]
cmp byte [ebx], 0
je 0x40c0e5
mov edi, dword [esp + 0x14]
push esi
push ebp
call fcn.0040be50
add esp, 8
test eax, eax
jl 0x40c13d
mov edi, dword [esp + 0x20]
jmp 0x40c10b
mov eax, dword [0x786dec]
test eax, eax
je 0x40c10b
push 0
push eax
push 0x4852b2
push 0x4852b2
push esi
push ebp
call fcn.0040b4f0
add esp, 0x18
test eax, eax
jl 0x40c13d
jg 0x40c11e
add edi, 4
cmp dword [edi], 0
mov dword [esp + 0x20], edi
jne 0x40c0c6
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
ret
mov ecx, dword [0x786dec]
push ecx
push str.Could_not_open_required_defaults_file:__s_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
push str.Fatal_error_in_defaults_handling._Program_aborted_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
ret