Function at 0x140001f90
Capabilities:
Query environment variable
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
xor edi, edi
mov ebx, ecx
mov rcx, qword [rdx]
xor al, al
mov r13d, edi
mov qword [rsp + 0x90], rdi
mov qword [rsp + 0x70], rdi
mov ebp, edi
mov qword [rsp + 0x68], rdi
mov r15d, edi
mov qword [rsp + 0x60], rdi
mov r14d, edi
mov dword [rsp + 0xf0], edi
mov r12d, edi
mov byte [rsp + 0xe8], al
mov rsi, rdx
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x88], rdi
call fcn.140003e50
mov rcx, qword [rsi]
call fcn.140006260
mov rcx, qword [rsi]
lea rdx, str.pgscripts_12
mov qword [rsp + 0x40], rax
call fcn.140004990
lea r9, [0x140001da0]
mov rdx, rsi
lea r8, str.createdb
mov ecx, ebx
call section..text
lea rax, [rsp + 0xf8]
mov rdx, rsi
lea r9, section..data
mov qword [rsp + 0x20], rax
lea r8, str.h:p:U:wWeO:D:T:E:l:
mov ecx, ebx
call fcn.140008440
cmp eax, 0xffffffff
je 0x1400021c7
lea rdx, [0x140000000]
nop dword [rax]
dec eax
cmp eax, 0x76
ja case.0x14000208f.15
cdqe
movzx eax, byte [rdx + rax + 0x265c]
mov ecx, dword [rdx + rax*4 + 0x2620]
add rcx, rdx
jmp rcx
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov qword [rsp + 0x70], rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov qword [rsp + 0x68], rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov qword [rsp + 0x60], rax
jmp 0x140002192
mov dword [rsp + 0xf0], 1
jmp 0x140002192
mov dword [rsp + 0xf0], 2
jmp 0x140002192
mov byte [rsp + 0xe8], 1
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov qword [rsp + 0x78], rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov qword [rsp + 0x80], rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov qword [rsp + 0x88], rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov rbp, rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov r15, rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov r14, rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov r12, rax
jmp 0x140002192
mov rcx, qword [0x140013bb0]
call fcn.140003ae0
mov r13, rax
lea rax, [rsp + 0xf8]
mov rdx, rsi
lea r9, section..data
mov qword [rsp + 0x20], rax
lea r8, str.h:p:U:wWeO:D:T:E:l:
mov ecx, ebx
call fcn.140008440
lea rdx, [0x140000000]
cmp eax, 0xffffffff
jne 0x140002070
movsxd rcx, dword [0x1400131f0]
sub ebx, ecx
je 0x140002294
sub ebx, 1
je 0x140002290
cmp ebx, 1
je 0x140002278
cmp dword [0x140013ba8], 4
jg 0x14000220c
lea eax, [rcx + 2]
mov ecx, 4
movsxd r8, eax
lea rdx, str.too_many_command_line_arguments__first_is___s__
mov r8, qword [rsi + r8*8]
call fcn.140004150
lea rcx, str.Try___s___help__for_more_information._n
call sub.libintl_8.dll_libintl_gettext
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rsp + 0x40]
mov rdx, rbx
mov rcx, rax
call fcn.140006c70
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rcx, str.Try___s___help__for_more_information._n
call sub.libintl_8.dll_libintl_gettext
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rsp + 0x40]
mov rdx, rbx
mov rcx, rax
call fcn.140006c70
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rdi, qword [rsi + rcx*8]
lea eax, [rcx + 1]
movsxd rcx, eax
mov rax, qword [rsi + rcx*8]
mov qword [rsp + 0x90], rax
jmp 0x140002294
mov rdi, qword [rsi + rcx*8]
test r12, r12
je 0x1400022e1
test r14, r14
je 0x1400022ba
cmp dword [0x140013ba8], 4
jg 0x14000230f
lea rdx, str.only_one_of___locale_and___lc_ctype_can_be_specified
mov ecx, 4
call fcn.140004150
jmp 0x14000230f
test r15, r15
je 0x1400022db
cmp dword [0x140013ba8], 4
jg 0x14000230f
lea rdx, str.only_one_of___locale_and___lc_collate_can_be_specified
mov ecx, 4
call fcn.140004150
jmp 0x14000230f
mov r14, r12
mov r15, r12
test rbp, rbp
je 0x14000231b
mov rcx, rbp
call sub.LIBPQ.dll_Ordinal_115
test eax, eax
jns 0x14000231b
cmp dword [0x140013ba8], 4
jg 0x14000230f
mov r8, rbp
lea rdx, str.__s__is_not_a_valid_encoding_name
mov ecx, 4
call fcn.140004150
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
test rdi, rdi
jne 0x140002346
lea rcx, str.PGDATABASE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140002517
lea rcx, str.PGDATABASE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdi, rax
mov rsi, qword [rsp + 0x40]
test r13, r13
jne 0x14000236f
lea rdx, str.postgres
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
lea rcx, str.template1
cmovne rcx, r13
mov r13, rcx
mov eax, dword [rsp + 0xf0]
mov rcx, r13
movzx r12d, byte [rsp + 0xe8]
mov r9, qword [rsp + 0x60]
mov r8, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
mov byte [rsp + 0x30], r12b
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], eax
call fcn.140001350
lea rcx, [rsp + 0x48]
mov rbx, rax
call sub.LIBPQ.dll_Ordinal_69
mov rcx, rdi
call fcn.140002770
mov r8, rax
lea rdx, str.CREATE_DATABASE__s
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_91
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x1400023f3
mov rcx, rax
call fcn.140002770
mov r8, rax
lea rdx, str._OWNER__s
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_91
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x14000241c
mov rcx, rax
call fcn.140002770
mov r8, rax
lea rdx, str._TABLESPACE__s
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_91
test rbp, rbp
je 0x140002442
lea rdx, str._ENCODING
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_75
mov r8, rbx
lea rcx, [rsp + 0x48]
mov rdx, rbp
call fcn.140002b10
mov rax, qword [rsp + 0x88]
test rax, rax
je 0x14000246b
mov rcx, rax
call fcn.140002770
mov r8, rax
lea rdx, str._TEMPLATE__s
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_91
test r15, r15
je 0x140002491
lea rdx, str._LC_COLLATE
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_75
mov r8, rbx
lea rcx, [rsp + 0x48]
mov rdx, r15
call fcn.140002b10
test r14, r14
je 0x1400024b7
lea rdx, str._LC_CTYPE
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_75
mov r8, rbx
lea rcx, [rsp + 0x48]
mov rdx, r14
call fcn.140002b10
mov dl, 0x3b
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_68
test r12b, r12b
je 0x1400024d9
mov rdx, qword [rsp + 0x48]
lea rcx, [0x14000c764]
call fcn.140006ce0
mov rdx, qword [rsp + 0x48]
mov rcx, rbx
call sub.LIBPQ.dll_Ordinal_21
mov rcx, rax
mov rsi, rax
call sub.LIBPQ.dll_Ordinal_33
cmp eax, 1
je 0x14000254a
cmp dword [0x140013ba8], 4
jg 0x1400025f3
mov rcx, rbx
call sub.LIBPQ.dll_Ordinal_15
lea rdx, str.database_creation_failed:__s
jmp 0x1400025e6
lea rcx, str.PGUSER
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140002535
lea rcx, str.PGUSER
jmp 0x14000233d
mov rsi, qword [rsp + 0x40]
mov rcx, rsi
call fcn.140005480
mov rdi, rax
jmp 0x14000234b
mov rcx, rsi
call sub.LIBPQ.dll_Ordinal_48
mov rsi, qword [rsp + 0x90]
test rsi, rsi
je 0x14000260f
mov rcx, rdi
call fcn.140002770
mov r8, rax
lea rdx, str.COMMENT_ON_DATABASE__s_IS
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_90
mov r8, rbx
lea rcx, [rsp + 0x48]
mov rdx, rsi
call fcn.140002b10
mov dl, 0x3b
lea rcx, [rsp + 0x48]
call sub.LIBPQ.dll_Ordinal_68
test r12b, r12b
je 0x1400025b1
mov rdx, qword [rsp + 0x48]
lea rcx, [0x14000c764]
call fcn.140006ce0
mov rdx, qword [rsp + 0x48]
mov rcx, rbx
call sub.LIBPQ.dll_Ordinal_21
mov rcx, rax
mov rdi, rax
call sub.LIBPQ.dll_Ordinal_33
cmp eax, 1
je 0x140002607
cmp dword [0x140013ba8], 4
jg 0x1400025f3
mov rcx, rbx
call sub.LIBPQ.dll_Ordinal_15
lea rdx, str.comment_creation_failed__database_was_created_:__s
mov r8, rax
mov ecx, 4
call fcn.140004150
mov rcx, rbx
call sub.LIBPQ.dll_Ordinal_4
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rcx, rdi
call sub.LIBPQ.dll_Ordinal_48
mov rcx, rbx
call sub.LIBPQ.dll_Ordinal_4
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3