Function at 0x1000c400
Capabilities:
Query environment variable

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, ebp
lea ecx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x1000c410
mov dword [esp + 8], 0
sub edi, ecx
je 0x1000c44d
cmp byte [edi + ebp - 1], 0x2e
jne 0x1000c44d
push ebp
call fcn.1000cc20
mov ecx, dword [esp + 0x24]
mov edx, eax
add esp, 4
mov eax, 0xf
mov dword [ecx], edx
xor ecx, ecx
test edx, edx
pop edi
cmovne eax, ecx
pop ebp
add esp, 0xc
ret
push ebx
push esi
mov esi, dword [esp + 0x20]
test byte [esi], 0x40
jne 0x1000c60f
push 0x2e
push ebp
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
jne 0x1000c60f
push str.HOSTALIASES
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x1000c60f
push 0x1000f28c
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov ebx, eax
add esp, 8
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x1000c5e4
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.10002c70
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1000c5c1
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
push edi
push ebp
push dword [esp + 0x18]
call sub.api_ms_win_crt_string_l1_1_0.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x1000c514
mov eax, dword [esp + 0x10]
movzx eax, byte [eax + edi]
push eax
call ebx
add esp, 4
test eax, eax
je 0x1000c514
mov esi, dword [esp + 0x10]
add esi, edi
movzx eax, byte [esi]
push eax
call ebx
add esp, 4
test eax, eax
je 0x1000c50f
nop dword [eax]
movzx eax, byte [esi + 1]
inc esi
push eax
call ebx
add esp, 4
test eax, eax
jne 0x1000c500
cmp byte [esi], 0
jne 0x1000c543
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
call fcn.10002c70
mov esi, eax
add esp, 0xc
test esi, esi
je 0x1000c4c5
push dword [esp + 0x10]
call dword [0x10011008]
push dword [esp + 0x18]
jmp 0x1000c5cc
mov al, byte [esi + 1]
lea edi, [esi + 1]
test al, al
je 0x1000c565
nop dword [eax]
movzx eax, al
push eax
call ebx
add esp, 4
test eax, eax
jne 0x1000c565
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1000c550
mov ebx, edi
sub ebx, esi
lea eax, [ebx + 1]
push eax
call dword [section..data]
mov ebp, dword [esp + 0x2c]
add esp, 4
mov dword [ebp], eax
test eax, eax
je 0x1000c595
push ebx
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp]
add esp, 0xc
sub eax, esi
mov byte [eax + edi], 0
push dword [esp + 0x10]
call dword [0x10011008]
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 8
xor ecx, ecx
cmp dword [ebp], ecx
mov eax, 0xf
cmovne eax, ecx
pop esi
pop ebx
pop edi
pop ebp
add esp, 0xc
ret
push dword [esp + 0x10]
call dword [0x10011008]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 8
cmp esi, 0xd
je 0x1000c60b
mov eax, esi
pop esi
pop ebx
pop edi
pop ebp
add esp, 0xc
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 2
je 0x1000c60f
sub eax, 1
je 0x1000c60f
mov eax, dword [esp + 0x28]
pop esi
pop ebx
pop edi
mov dword [eax], 0
mov eax, 0xe
pop ebp
add esp, 0xc
ret
mov esi, dword [esp + 0x20]
test byte [esi], 0x20
jne 0x1000c62e
cmp dword [esi + 0x28], 0
je 0x1000c62e
mov eax, dword [esp + 0x28]
pop esi
pop ebx
pop edi
mov dword [eax], 0
xor eax, eax
pop ebp
add esp, 0xc
ret
push ebp
call fcn.1000cc20
mov ecx, dword [esp + 0x2c]
add esp, 4
mov edx, eax
mov eax, 0xf
pop esi
mov dword [ecx], edx
xor ecx, ecx
pop ebx
test edx, edx
pop edi
cmovne eax, ecx
pop ebp
add esp, 0xc
ret