Function at 0x10148de0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x438
mov ebx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x444]
push dword [ebp + 0x10]
call fcn.10161ba0
add esp, 4
mov eax, dword [ebp - 0x444]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x10148f08
mov eax, dword [ebp - 0x440]
mov esi, 0x200
mov dword [ebp - 0x34], 2
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], eax
cmp esi, 0x201
jae 0x10148e80
jmp 0x10148e6e
jbe 0x10148f5b
cmp esi, 0x201
jae 0x10148e80
mov dword [ebp - 0x28], 0x200
lea ebx, [ebp - 0x444]
mov edi, esi
jmp 0x10148eb4
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub esi, edi
sub eax, edi
cmp eax, esi
jae 0x10148ea5
mov edx, edi
lea ecx, [ebp - 0x34]
push esi
call fcn.10134130
add esp, 4
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x14], edi
push 0
call sub.KERNEL32.dll_SetLastError
push edi
push ebx
push dword [ebp - 0x20]
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov esi, eax
test eax, eax
jne 0x10148ed8
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x10149040
cmp esi, edi
jne 0x10148e60
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x1014905a
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x10148e6e
jmp 0x10148e80
cmp byte [ebp - 0x440], 3
jne 0x10148f52
mov edi, dword [ebp - 0x43c]
mov esi, dword [edi + 4]
mov ebx, dword [edi]
mov eax, dword [esi]
push ebx
call eax
add esp, 4
cmp dword [esi + 4], 0
je 0x10148f41
cmp dword [esi + 8], 9
jb 0x10148f33
mov ebx, dword [ebx - 4]
push ebx
push 0
push dword [0x1038a110]
call sub.KERNEL32.dll_HeapFree
push edi
push 0
push dword [0x1038a110]
call sub.KERNEL32.dll_HeapFree
mov ebx, dword [ebp + 8]
mov byte [ebx + 0xc], 2
jmp 0x10149033
mov eax, dword [ebp - 0x28]
cmp esi, eax
ja 0x10149070
lea eax, [ebp - 0x44]
push esi
push ebx
push eax
call fcn.1014d9e0
add esp, 0xc
mov eax, dword [ebp - 0x3c]
movzx edx, word [ebp - 0x37]
movzx ecx, byte [ebp - 0x35]
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
movzx ebx, byte [ebp - 0x38]
mov dword [ebp - 0x10], eax
mov word [ebp - 0x1c], dx
mov byte [ebp - 0x1a], cl
cmp dword [ebp - 0x14], 0
je 0x10148fa9
push dword [ebp - 0x18]
push 0
push dword [0x1038a110]
call sub.KERNEL32.dll_HeapFree
cmp bl, 2
jne 0x10148ffc
mov ebx, dword [ebp + 8]
mov eax, esi
cmp al, 3
mov byte [ebx + 0xc], 2
jne 0x1014901d
mov eax, edi
mov edi, dword [edi]
mov esi, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [esi]
push edi
call eax
add esp, 4
cmp dword [esi + 4], 0
je 0x10148fea
cmp dword [esi + 8], 9
jb 0x10148fdc
mov edi, dword [edi - 4]
push edi
push 0
push dword [0x1038a110]
call sub.KERNEL32.dll_HeapFree
push dword [ebp - 0x14]
push 0
push dword [0x1038a110]
call sub.KERNEL32.dll_HeapFree
jmp 0x1014901d
movzx eax, word [ebp - 0x1c]
mov ecx, dword [ebp + 8]
mov bh, byte [ebp - 0x1a]
mov edx, dword [ebp - 0x10]
mov word [ecx + 0xd], ax
mov byte [ecx + 0xf], bh
mov dword [ecx], esi
mov dword [ecx + 4], edi
mov dword [ecx + 8], edx
mov byte [ecx + 0xc], bl
mov ebx, ecx
cmp dword [ebp - 0x24], 0
je 0x10149033
push dword [ebp - 0x20]
push 0
push dword [0x1038a110]
call sub.KERNEL32.dll_HeapFree
mov eax, ebx
add esp, 0x438
pop esi
pop edi
pop ebx
pop ebp
ret
xor esi, esi
mov bl, 2
call sub.KERNEL32.dll_GetLastError
mov edi, eax
cmp dword [ebp - 0x14], 0
jne 0x10148f99
jmp 0x10148fa9
push 0x1034c858
push 0x28
push str.internal_error:_entered_unreachable_code
call fcn.10026890
add esp, 0xc
jmp 0x1014907f
push 0x1034c848
push eax
push esi
call fcn.1002a190
add esp, 0xc
ud2