Function at 0x210049e70
Capabilities:
Get common file path
Query environment variable

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x40
lea rcx, [0x21034b020]
call method.wincapc.init__
mov r8d, 0x8000
lea rdx, [0x210307940]
xor ecx, ecx
call sym.GetModuleFileNameW
call sym.get_cygwin_startup_info__
mov r9d, dword [0x210317d88]
mov qword [0x21023ee48], rax
test r9d, r9d
je 0x21004a0a8
xor r8d, r8d
xor edx, edx
lea rcx, str.MSYS_TESTING
call sym.GetEnvironmentVariableA
test eax, eax
jne 0x21004a098
mov ecx, 3
lea rsi, [0x21022b100]
call sym.SetErrorMode
lea rcx, [0x2102738a0]
lea rdx, str.lock_process
call method.muto.init_char_const_
mov rax, qword [sym.msys_2.0.dll_reent_data]
lea rdx, [rax + 0x538]
mov qword [sym.msys_2.0.dll__impure_ptr], rax
mov qword [rax + 8], rdx
lea rdx, [rax + 0x5f0]
mov qword [rax + 0x10], rdx
lea rdx, [rax + 0x6a8]
mov qword [rax + 0x18], rdx
mov qword [0x210230a00], rax
lea rax, sym.msys_2.0.dll__impure_ptr
mov qword [0x2102308d8], rax
call sym.GetCurrentProcess
mov rbx, rax
call sym.GetCurrentThread
mov r12, rax
call sym.GetCurrentProcess
mov dword [rsp + 0x30], 2
mov r8, rbx
lea r9, [0x21024fb28]
mov dword [rsp + 0x28], 0
mov rcx, rax
mov rdx, r12
mov dword [rsp + 0x20], 0
call sym.DuplicateHandle
lea r8, [0x21024fb20]
mov edx, 0x2000000
mov rcx, 0xffffffffffffffff
call sym.NtOpenProcessToken
mov rcx, qword [0x21024fb20]
call sym.set_cygwin_privileges_void_
lea rdx, str.mallock
lea rcx, [0x21024fba0]
call method.muto.init_char_const_
call method.device.init__
mov rax, rsi
nop word cs:[rax + rax]
mov rbx, rax
lea rax, [rax + 8]
cmp qword [rbx + 8], 0
jne 0x210049fc0
cmp rbx, rsi
jbe 0x210049fe3
nop dword [rax + rax]
call qword [rbx]
sub rbx, 8
cmp rbx, rsi
ja 0x210049fd8
call method.cygthread.init__
mov rax, qword [0x21023ee48]
test rax, rax
je 0x21004a170
mov rdx, qword [rax + 0x48]
movzx eax, word [rax + 0x10]
mov qword [0x21025fe30], rdx
cmp ax, 2
jbe 0x21004a080
cmp ax, 3
jne 0x21004a020
mov rcx, qword [0x21023ee48]
call method.child_info_fork.handle_fork__
nop
mov rcx, qword [0x2102309f8]
call method.MTinterface.Init__
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
sub rax, 0x3200
mov qword [0x21024fae8], rax
mov eax, dword [0x21024faf8]
test eax, eax
je 0x21004a160
xor ecx, ecx
lea rdx, [sym.myfault_altstack_handler__EXCEPTION_POINTERS_]
call sym.AddVectoredContinueHandler
test byte [0x210273880], 1
jne 0x21004a138
add rsp, 0x40
pop rbx
pop rsi
pop r12
ret
test ax, ax
je 0x21004a020
mov rcx, qword [0x21023ee48]
call method.child_info_spawn.handle_spawn__
jmp 0x21004a020
mov byte [0x21024fae5], 1
jmp 0x210049ecd
lea rbx, [0x210317da0]
mov edx, 0x104
mov rcx, rbx
call sym.GetSystemDirectoryW
mov dword [0x210317d88], eax
test eax, eax
je 0x21004a17f
lea edx, [rax + 1]
xor r8d, r8d
mov eax, eax
mov ecx, 0x5c
mov word [rbx + rax*2], cx
mov word [rbx + rdx*2], r8w
lea rbx, [0x210317960]
mov dword [0x210317d88], edx
mov rcx, rbx
lea rdx, [0x21027651c]
call sym.msys_2.0.dll_wcpcpy
mov rcx, qword [0x210230a18]
mov edx, 0x100
call sym.GetSystemWindowsDirectoryW
mov qword [0x210317948], rbx
mov dword [0x210317950], eax
lea eax, [rax + rax + 8]
mov word [0x210317942], ax
mov word [0x210317940], ax
jmp 0x210049eb4
lea r9, str.finished_dll_crt0_0_initialization
lea r8, str.void_dll_crt0_0__
mov edx, 0x40
lea rcx, [0x210273880]
add rsp, 0x40
pop rbx
pop rsi
pop r12
jmp method.strace.prntf_unsigned_int__char_const__char_const__..._
call sym.sigproc_init__
jmp 0x21004a054
call sym.setup_cygheap__
call sym.memory_init__
jmp 0x21004a020
lea rcx, str.cant_find_windows_system_directory
call sym.api_fatal
nop
nop
nop
nop
nop