Function at 0x418e30
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x334
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x330], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
push str._5_4
push esi
push str._s_s
push ebx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x24], eax
call fcn.004019a0
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 + 0xc], edi
test edi, edi
jne 0x418e9a
push esi
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, eax
mov dword [esp + 0x10], eax
add esp, 4
test edi, edi
je 0x419132
mov edx, dword [ebx + 0x10]
mov ecx, ebx
add edx, 0x28
push str.LUA_NOENV
call fcn.00401a90
mov eax, dword [ebx + 0xc]
add esp, 4
add eax, 0xfffffff0
mov cl, byte [eax + 8]
cmp cl, 1
je 0x418ec9
test cl, 0xf
je 0x418ec9
mov esi, 1
jmp 0x418ecb
xor esi, esi
cmp dword [ebx + 0x24], eax
jb 0x418ee0
push 0
push 0xffffffffffffffff
mov edx, eax
mov ecx, ebx
call fcn.00410640
add esp, 8
mov dword [ebx + 0xc], eax
test esi, esi
jne 0x419132
push 0x437f30
push edi
call dword [sym.imp.VCRUNTIME140.dll_strstr]
mov ecx, eax
add esp, 8
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x418f1a
test edi, edi
jne 0x418f13
mov eax, dword [ebx + 0xc]
mov byte [eax + 8], cl
jmp 0x419159
mov edx, edi
jmp 0x419145
mov esi, edi
lea edx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x418f20
lea eax, [esp + 0x30]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], eax
sub esi, edx
mov eax, dword [ebx + 0xc]
lea edx, [esp + 0x20]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0x200
mov dword [eax], edx
mov byte [eax + 8], 2
add dword [ebx + 0xc], 0x10
cmp edi, ecx
jae 0x418fc4
mov eax, ecx
sub eax, edi
mov dword [esp + 0x18], eax
je 0x418f90
push 0xffffffffffffffff
mov edx, eax
lea ecx, [esp + 0x24]
call fcn.004036d0
add esp, 4
push dword [esp + 0x18]
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x34]
add esp, 0xc
add ecx, dword [esp + 0x18]
mov dword [esp + 0x28], ecx
jmp 0x418f94
mov ecx, dword [esp + 0x28]
cmp ecx, dword [esp + 0x24]
jb 0x418fb1
push 0xffffffffffffffff
mov edx, 1
lea ecx, [esp + 0x24]
call fcn.004036d0
mov ecx, dword [esp + 0x2c]
add esp, 4
mov eax, dword [esp + 0x20]
mov byte [eax + ecx], 0x3b
mov ecx, dword [esp + 0x28]
inc ecx
mov dword [esp + 0x28], ecx
jmp 0x418fc8
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
lea edx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x418fd0
sub edi, edx
je 0x419003
push 0xffffffffffffffff
mov edx, edi
lea ecx, [esp + 0x24]
call fcn.004036d0
add esp, 4
push edi
push dword [esp + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x34]
add esp, 0xc
add ecx, edi
mov dword [esp + 0x28], ecx
mov edi, dword [esp + 0xc]
lea eax, [edi - 2]
add eax, esi
cmp dword [esp + 0x10], eax
jae 0x419077
cmp ecx, dword [esp + 0x24]
jb 0x41902f
push 0xffffffffffffffff
mov edx, 1
lea ecx, [esp + 0x24]
call fcn.004036d0
mov ecx, dword [esp + 0x2c]
add esp, 4
mov eax, dword [esp + 0x20]
sub esi, dword [esp + 0x10]
add esi, 0xfffffffe
mov byte [eax + ecx], 0x3b
mov ecx, dword [esp + 0x28]
inc ecx
mov dword [esp + 0x28], ecx
add esi, edi
je 0x419077
push 0xffffffffffffffff
mov edx, esi
lea ecx, [esp + 0x24]
call fcn.004036d0
mov ecx, dword [esp + 0x14]
add esp, 4
add ecx, 2
push esi
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x34]
add esp, 0xc
add ecx, esi
mov dword [esp + 0x28], ecx
mov esi, dword [esp + 0x2c]
mov dword [esp + 0xc], esi
test ecx, ecx
jne 0x419091
mov edx, 0x436da0
mov ecx, esi
call fcn.00424040
jmp 0x4190a0
mov edx, dword [esp + 0x20]
push ecx
mov ecx, esi
call fcn.00423fc0
add esp, 4
mov ecx, dword [esi + 0xc]
mov dword [ecx], eax
mov al, byte [eax + 4]
or al, 0x40
mov byte [ecx + 8], al
mov eax, dword [esi + 0x10]
add dword [esi + 0xc], 0x10
cmp dword [eax + 0xc], 0
jle 0x4190c1
mov ecx, esi
call fcn.00412a50
lea eax, [esp + 0x30]
cmp dword [esp + 0x20], eax
je 0x4190e3
mov edx, dword [esi + 0xc]
mov ecx, esi
push 0
sub edx, 0x20
push 0xffffffffffffffff
call fcn.00410640
add esp, 8
mov byte [eax + 8], 0
mov eax, dword [esi + 0xc]
lea esi, [eax - 0x20]
push esi
mov edx, esi
lea edi, [eax - 0x10]
call fcn.00401540
add esp, 4
lea edx, [esi + 0x10]
push edi
call fcn.00401540
add esp, 4
mov edx, esi
push edi
call fcn.00401540
mov esi, dword [esp + 0x10]
add esp, 4
mov eax, dword [esi + 0xc]
sub eax, 0x10
cmp dword [esi + 0x24], eax
jb 0x41912d
push 0
push 0xffffffffffffffff
mov edx, eax
mov ecx, esi
call fcn.00410640
add esp, 8
mov dword [esi + 0xc], eax
jmp 0x41916d
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x419143
mov eax, dword [ebx + 0xc]
mov byte [eax + 8], 0
jmp 0x419159
mov edx, eax
mov ecx, ebx
call fcn.00424040
mov ecx, dword [ebx + 0xc]
mov dword [ecx], eax
mov al, byte [eax + 4]
or al, 0x40
mov byte [ecx + 8], al
mov eax, dword [ebx + 0x10]
add dword [ebx + 0xc], 0x10
cmp dword [eax + 0xc], 0
jle 0x41916d
mov ecx, ebx
call fcn.00412a50
push 0x105
lea eax, [esp + 0x234]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x419292
cmp eax, 0x105
je 0x419292
lea eax, [esp + 0x230]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x419292
mov byte [eax], 0
mov eax, dword [ebx + 0xc]
sub eax, 0x10
mov cl, byte [eax + 8]
and cl, 0xf
cmp cl, 4
je 0x4191ec
cmp cl, 3
je 0x4191cd
xor edx, edx
jmp 0x4191f1
mov edx, eax
mov ecx, ebx
call fcn.0041b8a0
mov eax, dword [ebx + 0x10]
cmp dword [eax + 0xc], 0
jle 0x4191e6
mov ecx, ebx
call fcn.00412a50
mov eax, dword [ebx + 0xc]
sub eax, 0x10
mov edx, dword [eax]
add edx, 0x10
lea eax, [esp + 0x230]
mov ecx, ebx
push eax
push 0x437efc
call fcn.004047e0
mov eax, dword [ebx + 0xc]
lea esi, [eax - 0x20]
push esi
mov edx, esi
lea edi, [eax - 0x10]
call fcn.00401540
add esp, 0xc
lea edx, [esi + 0x10]
push edi
call fcn.00401540
add esp, 4
mov edx, esi
push edi
call fcn.00401540
mov eax, dword [ebx + 0xc]
add esp, 4
sub eax, 0x10
cmp dword [ebx + 0x24], eax
jb 0x41924b
push 0
push 0xffffffffffffffff
mov edx, eax
mov ecx, ebx
call fcn.00410640
add esp, 8
push dword [esp + 0x1c]
lea edx, [eax - 0x30]
mov dword [ebx + 0xc], eax
mov ecx, ebx
call fcn.00401c00
mov eax, dword [ebx + 0xc]
add esp, 4
sub eax, 0x10
cmp dword [ebx + 0x24], eax
jb 0x41927a
push 0
push 0xffffffffffffffff
mov edx, eax
mov ecx, ebx
call fcn.00410640
add esp, 8
mov ecx, dword [esp + 0x33c]
pop edi
pop esi
mov dword [ebx + 0xc], eax
pop ebx
xor ecx, esp
call fcn.00434cb0
mov esp, ebp
pop ebp
ret
push str.unable_to_get_ModuleFileName
push ebx
call fcn.00403010
int3