Function at 0x10017430
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x12c
mov eax, dword [0x1003400c]
xor eax, esp
mov dword [esp + 0x128], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, edx
mov dword [esp + 0x14], ebx
push eax
mov dword [esp + 0x14], esi
mov edi, ecx
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
jne 0x100174c3
test ebx, ebx
jne 0x10017480
mov eax, dword [edi + 8]
mov dword [eax + 0xc], ebx
add dword [edi + 8], 0x10
jmp 0x10017521
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x10017483
sub ebx, ecx
mov ecx, dword [edi + 0x10]
mov eax, dword [ecx + 0x44]
cmp eax, dword [ecx + 0x40]
jb 0x1001749e
mov ecx, edi
call fcn.10011300
mov edx, dword [esp + 0x14]
mov ecx, edi
mov esi, dword [edi + 8]
push ebx
call fcn.1001de30
mov dword [esi], eax
add esp, 4
mov dword [esi + 0xc], 4
add dword [edi + 8], 0x10
mov esi, dword [esp + 0x10]
jmp 0x10017521
push 0x10030ec0
push 0x10030ec4
mov edx, eax
mov ecx, edi
call fcn.10006780
push ebx
push 0x10030ec8
mov edx, eax
mov ecx, edi
call fcn.10006780
add esp, 0x10
mov edx, 0xfffffffe
mov ecx, edi
call fcn.10004ed0
lea edx, [eax + 0x10]
mov eax, dword [edi + 8]
cmp edx, eax
jae 0x1001751b
nop
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [edx - 0x10], eax
mov dword [edx - 0xc], ecx
mov eax, dword [edx + 0xc]
mov dword [edx - 4], eax
add edx, 0x10
mov eax, dword [edi + 8]
cmp edx, eax
jb 0x10017500
add eax, 0xfffffff0
mov dword [edi + 8], eax
push 0x105
lea eax, [esp + 0x2c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x100175f3
cmp eax, 0x105
je 0x100175f3
lea eax, [esp + 0x28]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x100175f3
or edx, 0xffffffff
mov byte [eax], 0
mov ecx, edi
call fcn.10004ed0
cmp dword [eax + 0xc], 4
je 0x1001759e
mov edx, eax
mov ecx, edi
call fcn.100240d0
test eax, eax
jne 0x10017582
xor edx, edx
jmp 0x100175a3
mov ecx, dword [edi + 0x10]
mov eax, dword [ecx + 0x44]
cmp eax, dword [ecx + 0x40]
jb 0x10017594
mov ecx, edi
call fcn.10011300
or edx, 0xffffffff
mov ecx, edi
call fcn.10004ed0
mov edx, dword [eax]
add edx, 0x10
lea eax, [esp + 0x28]
mov ecx, edi
push eax
push 0x10030d00
call fcn.10006780
add esp, 8
mov edx, 0xfffffffe
mov ecx, edi
call fcn.10004ed0
mov ecx, dword [edi + 8]
add eax, 0x10
cmp eax, ecx
jae 0x100175eb
nop dword [eax]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [eax - 0x10], ecx
mov dword [eax - 0xc], edx
mov ecx, dword [eax + 0xc]
mov dword [eax - 4], ecx
add eax, 0x10
mov ecx, dword [edi + 8]
cmp eax, ecx
jb 0x100175d0
lea eax, [ecx - 0x10]
mov dword [edi + 8], eax
jmp 0x10017601
push str.unable_to_get_ModuleFileName
push edi
call fcn.10005c30
add esp, 8
mov edx, 0xfffffffe
mov ecx, edi
call fcn.10004ed0
mov ebx, eax
lea eax, [esi + 1]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x10017612
mov edx, dword [esp + 0x10]
sub esi, eax
push esi
mov ecx, edi
call fcn.1001de30
mov dword [esp + 0x1c], eax
add esp, 4
mov eax, dword [edi + 8]
mov edx, ebx
sub eax, 0x10
mov dword [esp + 0x24], 4
mov ecx, edi
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.100243b0
add dword [edi + 8], 0xfffffff0
add esp, 8
mov ecx, dword [esp + 0x134]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10028b0c
mov esp, ebp
pop ebp
ret