Function at 0x14003ed70
Capabilities:
Initialize winsock library
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x250
mov rax, qword [0x14049b9c0]
xor rax, rsp
mov qword [rsp + 0x240], rax
cmp byte [0x1404accb4], 0
jne 0x14003f09a
inc dword [0x1404accb0]
xor esi, esi
mov dword [0x1404ad540], esi
mov byte [0x1404accb4], 1
mov dword [0x1402cee64], 0x1b0
mov dword [0x1402cee68], 0x1c0
call fcn.140048030
movsxd rcx, eax
mov qword [0x1402ced80], rcx
lea rcx, str.UMASK
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
test rax, rax
je 0x14003edf8
mov rcx, rax
call fcn.14003ebd0
or eax, 0x180
mov dword [0x1402cee64], eax
lea rcx, str.UMASK_DIR
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
test rax, rax
je 0x14003ee1c
mov rcx, rax
call fcn.14003ebd0
or eax, 0x1c0
mov dword [0x1402cee68], eax
call fcn.140005e00
xor ecx, ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov qword [0x1404accb8], rax
lea rax, [0x1404accb8]
mov qword [0x1404acca8], rax
lea rax, str.unknown
mov qword [0x1404ad328], rax
mov qword [0x1404accc0], rsi
call fcn.140005e00
call fcn.14003ab80
test al, al
jne 0x14003f096
mov rcx, qword [0x1404ad320]
mov qword [rsp + 0x260], rdi
test rcx, rcx
je 0x14003eefc
call fcn.14003f510
add rax, qword [0x1404ad320]
lea rdx, str.mariadb
mov rcx, rax
mov qword [0x1404ad328], rax
mov r8d, 7
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
je 0x14003eefc
mov rdx, qword [0x1404ad320]
lea rcx, [rsp + 0x40]
xor r8d, r8d
call fcn.1400474b0
test eax, eax
jne 0x14003eefc
lea rcx, [rsp + 0x40]
call fcn.14003f510
lea rcx, [rsp + 0x40]
mov r8d, 7
add rcx, rax
lea rdx, str.mariadb
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
jne 0x14003eefc
lea r8, [rsp + 0x40]
mov edx, reloc.WS2_32.dll_recv
mov ecx, 0x28
call fcn.14003a440
lea rcx, str.HOME
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov qword [0x1404ad318], rax
test rax, rax
je 0x14003ef2a
mov rdx, rax
lea rcx, [0x1404ad110]
call fcn.140047930
mov qword [0x1404ad318], rax
call fcn.140046a60
lea rcx, [0x14003a5f0]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call sub.api_ms_win_crt_time_l1_1_0.dll__tzset
xor ecx, ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov ecx, 1
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov ecx, 2
mov qword [rsp + 0x28], rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov qword [rsp + 0x30], rax
lea rbx, [rsp + 0x20]
mov edi, 3
mov rcx, qword [rbx]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__fileno
test eax, eax
js 0x14003ef8c
mov edx, 0x8000
mov ecx, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__setmode
add rbx, 8
sub rdi, 1
jne 0x14003ef74
mov rdi, qword [rsp + 0x260]
mov ecx, 0x8000
call sub.api_ms_win_crt_stdio_l1_1_0.dll__set_fmode
mov ecx, 1
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__fileno
test eax, eax
js 0x14003f011
mov ecx, 1
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__fileno
mov ecx, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__isatty
test eax, eax
je 0x14003f011
call qword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov dword [0x1404accc8], eax
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
cmp dword [0x1404accc8], 0
mov esi, 1
mov dword [0x1404acccc], eax
je 0x14003f011
test eax, eax
je 0x14003f011
lea rcx, [0x14003f0c0]
call fcn.14008dff4
call qword [sym.imp.KERNEL32.dll_GetACP]
cmp eax, 0xfde9
jne 0x14003f05e
lea rdx, str.en_US.UTF8
xor ecx, ecx
call sub.api_ms_win_crt_locale_l1_1_0.dll_setlocale
test esi, esi
je 0x14003f05e
cmp dword [0x1404accc8], 0xfde9
jne 0x14003f048
cmp dword [0x1404acccc], 0xfde9
je 0x14003f05e
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_SetConsoleCP]
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0x202
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x14003f09a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
lea rdx, str.WSAStartup___failed_with_error:__d_n
mov r8d, ebx
call fcn.140018470
mov al, 1
jmp 0x14003f09c
xor al, al
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14008e500
mov rbx, qword [rsp + 0x268]
add rsp, 0x250
pop rsi
ret