Function at 0x4126dc
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4ac
mov eax, dword [0x42e0b4]
xor eax, esp
mov dword [esp + 0x4a8], eax
push ebx
xor eax, eax
mov dword [esp + 4], ecx
xor ecx, ecx
mov dword [esp + 0x18], eax
mov word [esp + 0x20], ax
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x10], ecx
lea edi, [esp + 0x4a]
mov dword [esp + 0x14], ecx
mov esi, 0x104
mov dword [esp + 0x18], ecx
inc ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2a], ecx
mov dword [esp + 0x2e], ecx
mov dword [esp + 0x32], ecx
mov dword [esp + 0x36], ecx
mov dword [esp + 0x3a], ecx
mov dword [esp + 0x3e], ecx
mov dword [esp + 0x42], ecx
mov dword [esp + 0x46], ecx
stosd dword es:[edi], eax
push esi
push ecx
mov dword [esp + 0x290], ecx
stosd dword es:[edi], eax
mov byte [esp + 0x294], bl
mov dword [esp + 0x298], esi
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov dword [esp + 0x60], ecx
lea edi, [esp + 0x7c]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ecx
mov byte [esp + 0x6c], cl
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x88]
push eax
call fcn.00417fbd
xor eax, eax
lea ecx, [esp + 0x8c]
add esp, 0xc
cmp byte [esp + 0x28c], al
sete al
dec eax
and eax, 0x7ee3
add eax, esi
push eax
call fcn.0040e3f0
xor edi, edi
test eax, eax
js 0x4128f8
mov esi, dword [0x436778]
mov eax, 0x104
push eax
mov dword [esp + 0x4ac], eax
lea eax, [esp + 0x29c]
push edi
push eax
mov dword [esp + 0x20], 6
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], 0x8000
mov dword [esp + 0x64], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x4ac], edi
mov byte [esp + 0x4b0], bl
call fcn.00417fbd
add esp, 0xc
push edi
push edi
push 0x4025d0
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetEnvironmentVariableW]
push eax
lea ecx, [esp + 0x29c]
call fcn.0040e3f0
test eax, eax
js 0x4128e2
mov eax, dword [esp + 0x4a0]
test eax, eax
jne 0x41284a
lea eax, [esp + 0x298]
push dword [esp + 0x4a8]
push eax
push 0x4025d0
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x41f3b2
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
call fcn.00409144
cmp eax, ebx
je 0x4128e2
mov eax, dword [esp + 0x10]
test al, 0x40
je 0x412887
and eax, 0xfffb79fb
mov dword [esp + 0x10], eax
test eax, 0x400
jne 0x41f3e7
mov ecx, dword [esp + 0x288]
test ecx, ecx
je 0x41f3f5
mov edx, dword [esp + 0x290]
push edi
call fcn.00408e9e
cmp dword [esp + 0x58], edi
je 0x41f401
lea ecx, [esp + 0x10]
call fcn.0041161d
mov ebx, eax
mov eax, dword [esp + 0x288]
test eax, eax
je 0x412929
push dword [esp + 0x290]
push eax
call fcn.0041238b
mov ecx, esi
call fcn.0041198f
mov eax, dword [esp + 0x4a0]
mov dword [esp + 0x4a0], edi
test eax, eax
jne 0x41f431
mov eax, dword [esp + 0x288]
mov dword [esp + 0x288], edi
test eax, eax
je 0x412912
push eax
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov ecx, dword [esp + 0x4b4]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00416b30
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x80]
jmp 0x4128ce
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x1c]
jae 0x41f4da
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
je 0x41f4da
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
sub ecx, 8
shr ecx, 1
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 8]
add edx, 8
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], 0
or byte [ecx + 0x45c7f055], cl
cld
add byte [eax], al
add byte [eax], al
jmp 0x41f3c8
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x20]
jae 0x41f4c9
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
add eax, dword [edx]
mov ecx, 0xfff
mov edx, dword [ebp - 4]
mov esi, dword [ebp - 0x10]
and cx, word [esi + edx*2]
movzx ecx, cx
add eax, ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 4]
cld
mov eax, dword [ebp - 0x10]
mov cx, word [eax + edx*2]
shr cx, 0xc
and cx, 0xf
movzx edx, cx
cmp edx, 0xa
jne 0x41f41f
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0xc]
mov dword [edx], ecx
jmp 0x41f4c4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov dx, word [ecx + eax*2]
shr dx, 0xc
and dx, 0xf
movzx eax, dx
cmp eax, 1
jne 0x41f461
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx]
and edx, 0xffff
movzx eax, dx
shl eax, 0x10
cdq
mov ecx, dword [ebp - 0x28]
add eax, ecx
shr eax, 0x10
and eax, 0xffff
mov edx, dword [ebp - 0xc]
mov word [edx], ax
jmp 0x41f4c4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov dx, word [ecx + eax*2]
shr dx, 0xc
and dx, 0xf
movzx eax, dx
cmp eax, 2
jne 0x41f49b
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx]
mov eax, dword [ebp - 0x28]
and eax, 0xffff
and eax, 0xffff
movzx ecx, ax
add edx, ecx
mov eax, dword [ebp - 0xc]
mov word [eax], dx
jmp 0x41f4c4
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
mov ax, word [edx + ecx*2]
shr ax, 0xc
and ax, 0xf
movzx ecx, ax
cmp ecx, 3
jne 0x41f4c4
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x28]
add eax, ecx
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
jmp 0x41f3bf
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 8]
add edx, dword [ecx + 4]
mov dword [ebp - 8], edx
jmp 0x41f386
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret