Function at 0x4760da
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa3c
mov eax, dword [0x5a1014]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x5a4f4c], 0
push ebx
push esi
push edi
jne 0x4c6386
mov eax, dword [0x5a4e24]
xor edi, edi
mov dword [ebp - 0xa38], edi
mov ebx, 0x104
test eax, eax
jne 0x4c63a7
mov eax, dword [0x5a30e8]
mov esi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wdupenv_s]
mov dword [ebp - 0xa34], edi
test eax, eax
jne 0x4c6539
push 0x4034e8
push edi
push 0x5a30e8
call esi
add esp, 0xc
mov eax, dword [0x5a30e8]
test eax, eax
jne 0x4c6553
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047a40f
leave
ret
mov eax, dword [0x5a30e8]
test eax, eax
je 0x47614d
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
and dword [0x5a30e8], 0
pop ecx
jmp 0x47614d
cmp dword [0x5a3054], edi
je 0x4c6523
mov esi, dword [sym.imp.VCRUNTIME140.dll_wcschr]
push 0x2f
push eax
call esi
pop ecx
pop ecx
test eax, eax
jne 0x4c6451
push 0x5c
push dword [0x5a4e24]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x4c6451
push 0x100
lea eax, [ebp - 0x410]
push eax
push ebx
lea eax, [ebp - 0x828]
push eax
push edi
push edi
push edi
push edi
push dword [0x5a3054]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
add esp, 0x24
lea eax, [ebp - 0x828]
push eax
lea eax, [ebp - 0x620]
push ebx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x620]
push ebx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 0xc
lea eax, [ebp - 0x620]
push dword [0x5a4e24]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x476117
jmp 0x4c64f3
push ebx
push dword [0x5a3054]
lea eax, [ebp - 0x620]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfullpath]
add esp, 0xc
test eax, eax
jne 0x4c6473
xor ecx, ecx
call fcn.0047dc27
lea esi, [ebp - 0x620]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, di
jne 0x4c647c
mov edx, dword [0x5a4e24]
sub esi, ecx
mov edi, edx
sar esi, 1
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
cmp ax, word [ebp - 0xa38]
jne 0x4c6496
sub edi, ecx
mov ecx, edx
sar edi, 1
lea eax, [ecx + 2]
mov dword [ebp - 0xa3c], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0xa38]
jne 0x4c64b4
sub ecx, dword [ebp - 0xa3c]
mov eax, esi
sar ecx, 1
sub eax, ecx
lea ecx, [ebp - 0x620]
push edx
lea eax, [ecx + eax*2]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4c64f1
cmp esi, edi
jb 0x4c64f1
xor edi, edi
jmp 0x476117
xor edi, edi
mov eax, dword [0x5a30e8]
test eax, eax
je 0x47614d
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
jmp 0x4c6518
push 0xfce
push edi
call fcn.004fd88b
add esp, 0xc
mov dword [0x5a30e8], edi
jmp 0x47614d
push 0x425868
push 0x425874
push 0x4c4
push 0
call fcn.0047dc0b
push eax
push 0x4034e8
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wputenv_s]
pop ecx
pop ecx
mov byte [0x5a3018], 1
jmp 0x476140
push ebx
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfullpath]
add esp, 0xc
lea eax, [ebp - 0xa30]
push ebx
push 0x4046fc
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfullpath]
add esp, 0xc
lea eax, [ebp - 0xa30]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push dword [0x5a30e8]
test eax, eax
je 0x4c650a
push 0x1792
push edi
call fcn.004fd507
add esp, 0xc
lea eax, [ebp - 0xa34]
push 0x425898
push edi
push eax
call esi
mov eax, dword [ebp - 0xa34]
add esp, 0xc
test eax, eax
jne 0x4c65cc
mov eax, 0x4258b8
push eax
lea eax, [ebp - 0x210]
push ebx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 0xc
push dword [ebp - 0xa34]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
push 0x20
mov edx, 0x4258cc
mov dword [ebp - 0xa34], edi
lea ecx, [ebp - 0x210]
call fcn.0042fcdc
mov dword [0x5a352c], eax
pop ecx
test eax, eax
jne 0x4c6630
lea eax, [ebp - 0x210]
push eax
push 0x478
push edi
jmp 0x4c662b
lea eax, [ebp - 0x418]
push eax
push 0x478
xor eax, eax
push eax
call fcn.0047dc0b
push ecx
push ecx
call fcn.004fd92c
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov edi, eax
test edi, edi
je 0x47614d
lea esi, [ebp - 0x210]
xor edx, edx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x4c6654
lea eax, [ebp - 0x210]
sub esi, ecx
push eax
lea eax, [ebp - 0x418]
sar esi, 1
push ebx
push eax
add esi, 0xfffffff8
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0x418]
sub ebx, esi
lea eax, [eax + esi*2]
push 0x4258d4
push ebx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea ecx, [ebp - 0x418]
mov edx, 0x4090f8
push 0x20
call fcn.0042fcdc
mov esi, eax
pop ecx
test esi, esi
je 0x4c661c
xor ebx, ebx
jmp 0x4c66e3
push edi
push 0x405a70
push esi
call fcn.004fd8fd
mov ecx, edi
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4c66ce
sub ecx, edx
sar ecx, 1
lea edi, [edi + ecx*2]
add edi, 2
cmp word [edi], bx
jne 0x4c66ba
mov ecx, esi
call fcn.0042fefa
jmp 0x47614d