Function at 0x1010d160
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x234
mov eax, dword [0x1043900c]
xor eax, esp
mov dword [esp + 0x230], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push str._5_4
push ebx
mov esi, ecx
mov dword [esp + 0x2c], edx
push str._s_s
push esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], eax
call fcn.100f6070
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, eax
add esp, 0x14
mov dword [esp + 0x14], edi
test edi, edi
jne 0x1010d1e6
push ebx
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, eax
mov dword [esp + 0x18], eax
add esp, 4
test edi, edi
jne 0x1010d1e6
lea ebx, [esi + 0xc]
mov eax, dword [esp + 0x1c]
mov edi, ebx
test eax, eax
jne 0x1010d3c9
mov eax, dword [ebx]
mov byte [eax + 8], 0
jmp 0x1010d3de
mov edx, dword [esi + 0x10]
mov ecx, esi
add edx, 0x28
push str.LUA_NOENV
call fcn.100f6160
mov eax, dword [esi + 0xc]
lea ebx, [esi + 0xc]
add eax, 0xfffffff0
add esp, 4
mov dword [esp + 0x18], eax
mov cl, byte [eax + 8]
cmp cl, 1
je 0x1010d21d
mov dword [esp + 0x10], 1
test cl, 0xf
jne 0x1010d225
mov dword [esp + 0x10], 0
cmp dword [esi + 0x24], eax
jb 0x1010d23e
push 0
push 0xffffffffffffffff
mov edx, eax
mov ecx, esi
call fcn.10103b90
mov eax, dword [esp + 0x20]
add esp, 8
cmp dword [esp + 0x10], 0
mov dword [ebx], eax
jne 0x1010d1cd
push 0x10417bb4
push edi
call dword [sym.imp.VCRUNTIME140.dll_strstr]
mov ecx, eax
add esp, 8
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x1010d29c
test edi, edi
jne 0x1010d26b
mov eax, dword [ebx]
mov byte [eax + 8], cl
jmp 0x1010d280
mov edx, edi
mov ecx, esi
call fcn.10117960
mov ecx, dword [ebx]
mov dword [ecx], eax
mov al, byte [eax + 4]
or al, 0x40
mov byte [ecx + 8], al
mov eax, dword [esi + 0x10]
add dword [ebx], 0x10
cmp dword [eax + 0xc], 0
jle 0x1010d3f3
mov ecx, esi
call fcn.101074c0
jmp 0x1010d3f3
lea edx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x1010d2a0
lea eax, [esp + 0x38]
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], eax
sub edi, edx
mov eax, dword [ebx]
lea edx, [esp + 0x28]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0x200
mov dword [eax], edx
mov byte [eax + 8], 2
add dword [ebx], 0x10
mov eax, dword [esp + 0x14]
cmp eax, ecx
jae 0x1010d340
sub ecx, eax
mov dword [esp + 0x18], ecx
je 0x1010d313
mov edx, ecx
lea ecx, [esp + 0x28]
push 0xffffffffffffffff
call fcn.100f8440
add esp, 4
push dword [esp + 0x18]
push dword [esp + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x3c]
add esp, 0xc
add ecx, dword [esp + 0x18]
mov dword [esp + 0x30], ecx
jmp 0x1010d317
mov ecx, dword [esp + 0x30]
cmp ecx, dword [esp + 0x2c]
jb 0x1010d334
push 0xffffffffffffffff
mov edx, 1
lea ecx, [esp + 0x2c]
call fcn.100f8440
mov ecx, dword [esp + 0x34]
add esp, 4
mov eax, dword [esp + 0x28]
mov byte [eax + ecx], 0x3b
inc dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
call fcn.100f8670
mov eax, dword [esp + 0x14]
add eax, 0xfffffffe
add eax, edi
cmp dword [esp + 0x10], eax
jae 0x1010d3be
mov ecx, dword [esp + 0x30]
cmp ecx, dword [esp + 0x2c]
jb 0x1010d37d
push 0xffffffffffffffff
mov edx, 1
lea ecx, [esp + 0x2c]
call fcn.100f8440
mov ecx, dword [esp + 0x34]
add esp, 4
mov eax, dword [esp + 0x28]
sub edi, dword [esp + 0x10]
mov byte [eax + ecx], 0x3b
mov eax, dword [esp + 0x14]
inc dword [esp + 0x30]
add eax, 0xfffffffe
add edi, eax
je 0x1010d3be
push 0xffffffffffffffff
mov edx, edi
lea ecx, [esp + 0x2c]
call fcn.100f8440
mov ecx, dword [esp + 0x14]
add esp, 4
add ecx, 2
push edi
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add dword [esp + 0x30], edi
lea ecx, [esp + 0x28]
call fcn.100f86b0
jmp 0x1010d3f3
mov edx, eax
mov ecx, esi
call fcn.10117960
mov ecx, dword [ebx]
mov dword [ecx], eax
mov al, byte [eax + 4]
or al, 0x40
mov byte [ecx + 8], al
mov eax, dword [esi + 0x10]
add dword [ebx], 0x10
mov ebx, edi
cmp dword [eax + 0xc], 0
jle 0x1010d3f3
mov ecx, esi
call fcn.101074c0
push 0x105
lea eax, [esp + 0x2c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x1010d4e1
cmp eax, 0x105
je 0x1010d4e1
lea eax, [esp + 0x28]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x1010d4e1
mov byte [eax], 0
or edx, 0xffffffff
lea eax, [esp + 0x28]
mov ecx, esi
push eax
push 0x10417b5c
push 0
call fcn.100f5dc0
add esp, 4
mov edx, eax
mov ecx, esi
call fcn.100f96f0
mov eax, dword [ebx]
lea esi, [eax - 0x20]
push esi
mov edx, esi
lea edi, [eax - 0x10]
call fcn.100f5a00
add esp, 0xc
lea edx, [esi + 0x10]
push edi
call fcn.100f5a00
add esp, 4
mov edx, esi
push edi
call fcn.100f5a00
mov esi, dword [esp + 0x24]
add esp, 4
mov edi, dword [ebx]
sub edi, 0x10
cmp dword [esi + 0x24], edi
jb 0x1010d49d
push 0
push 0xffffffffffffffff
mov edx, edi
mov ecx, esi
call fcn.10103b90
add esp, 8
push dword [esp + 0x24]
lea edx, [edi - 0x30]
mov dword [ebx], edi
mov ecx, esi
call fcn.100f63e0
mov edi, dword [ebx]
add esp, 4
sub edi, 0x10
cmp dword [esi + 0x24], edi
jb 0x1010d4ca
push 0
push 0xffffffffffffffff
mov edx, edi
mov ecx, esi
call fcn.10103b90
add esp, 8
mov ecx, dword [esp + 0x23c]
mov dword [ebx], edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.102bb91c
mov esp, ebp
pop ebp
ret
push str.unable_to_get_ModuleFileName
push esi
call fcn.100f7da0
int3