Function at 0x30001c44
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x210
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x22c]
mov ebp, 0x104
push ebp
push edi
and word [edi], 0
push 0x30001f9b
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test esi, esi
jne 0x30001d89
push 0x30001f87
push dword [esp + 0x228]
call fcn.30001bee
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
pop ecx
test eax, eax
pop ecx
mov dword [esp + 0x10], eax
je 0x30001c99
push eax
jmp 0x30001cc3
push 0x30001f6f
push dword [esp + 0x228]
call fcn.30001bee
pop ecx
mov dword [esp + 0x14], eax
test eax, eax
pop ecx
je 0x30001ce7
push eax
call fcn.30001fc3
test al, al
pop ecx
jne 0x30001ce7
push dword [esp + 0x10]
call ebx
mov esi, eax
lea eax, [esi + 1]
cmp eax, ebp
jle 0x30001cd3
mov esi, 0x103
lea eax, [esi + 1]
push eax
push dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
and word [edi + esi*2], 0
cmp word [edi], 0
jne 0x30001d94
push 0x30001f55
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 0x30001f44
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ecx, ecx
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x30001d7d
push edi
push ecx
push ecx
push 0x1c
push ecx
call eax
test eax, eax
push edi
jge 0x30001d5f
xor esi, esi
push esi
push esi
push 0x1c
push esi
call dword [esp + 0x24]
test eax, eax
jge 0x30001d44
push esi
push esi
push esi
push 0x30001f37
push 3
call fcn.30001057
add esp, 0x14
push edi
call ebx
mov ecx, 0x103
sub ecx, eax
lea eax, [edi + eax*2]
push ecx
push 0x30001ef5
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push edi
call ebx
mov ecx, 0x103
sub ecx, eax
lea eax, [edi + eax*2]
push ecx
push 0x30001ed3
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push edi
call ebx
mov esi, eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x30001d94
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
call ebx
mov esi, eax
lea eax, [esi + 1]
cmp eax, ebp
mov dword [esp + 0x14], eax
jge 0x30001dc3
mov cx, word [edi + esi*2 - 2]
lea eax, [edi + esi*2]
cmp cx, 0x5c
je 0x30001dc3
cmp cx, 0x2f
je 0x30001dc3
push 0x30001ecf
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [esp + 0x14]
push 0x30001eb7
push dword [esp + 0x228]
call fcn.30001bee
pop ecx
mov dword [esp + 0x14], eax
test eax, eax
pop ecx
je 0x30001dfe
push eax
call ebx
add eax, esi
mov dword [esp + 0x14], eax
inc eax
cmp eax, ebp
jge 0x30001dfe
push dword [esp + 0x10]
lea eax, [edi + esi*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [esp + 0x14]
lea eax, [esi + 1]
cmp eax, ebp
jge 0x30001e25
mov ax, word [edi + esi*2 - 2]
lea esi, [edi + esi*2]
cmp ax, 0x5c
je 0x30001e25
cmp ax, 0x2f
je 0x30001e25
push 0x30001ecf
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
call fcn.30001fc3
test al, al
pop ecx
je 0x30001e3e
lea eax, [esp + 0x18]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x30001e9b
mov esi, dword [esp + 0x228]
push esi
call ebx
lea eax, [esi + eax*2]
cmp esi, eax
jae 0x30001e66
mov dx, word [eax - 2]
lea ecx, [eax - 2]
cmp dx, 0x5c
je 0x30001e66
cmp dx, 0x2f
je 0x30001e66
mov eax, ecx
jmp 0x30001e4b
sub eax, esi
sar eax, 1
inc eax
cmp eax, ebp
jl 0x30001e71
mov eax, ebp
push eax
lea eax, [esp + 0x1c]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynW]
push eax
call esi
lea eax, [esp + 0x18]
push eax
call ebx
mov ecx, ebp
sub ecx, eax
lea eax, [esp + 0x18]
push ecx
push edi
push eax
call ebx
lea eax, [esp + eax*2 + 0x20]
push eax
call esi
push 0
push edi
lea eax, [esp + 0x20]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret