Function at 0x41c1f0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
push ebx
push esi
push edi
mov edi, 1
add dword [0x52fdf0], edi
mov ebx, ecx
mov dword [ebx + 0x2098], 0x8b
jne 0x41c21b
mov dword [0x52fdf0], edi
mov eax, dword [0x52fdf0]
mov dword [ebx + 0x209c], eax
mov ecx, dword [0x52fe14]
mov dword [ebx + 0x20a0], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebx + 0x20a4], eax
cmp dword [0x5306c8], 0
je 0x41c25d
mov eax, dword [0x52fe34]
cmp dword [eax + 0xf2be0], 0
je 0x41c25d
mov eax, dword [eax + 0x125fc]
jmp 0x41c25f
xor eax, eax
mov dword [ebx + 0x20a8], eax
mov eax, dword [0x52fe30]
xor edx, edx
cmp byte [eax + 0x11634], dl
push 0
setne dl
mov dword [ebx + 0x26c6], edx
mov ecx, dword [0x52fe30]
movzx eax, byte [ecx + 0xf40]
mov edx, dword [ebx + 0x26ca]
neg eax
sbb eax, eax
and eax, 2
and edx, 0xfffffffd
or eax, edx
mov dword [ebx + 0x26ca], eax
mov ecx, dword [0x52fe30]
movzx ecx, byte [ecx + 0x11635]
neg ecx
sbb ecx, ecx
and eax, 0xfffffffb
and ecx, 4
or ecx, eax
mov dword [ebx + 0x26ca], ecx
mov edx, dword [0x52fe30]
movzx eax, byte [edx + 0x1163f]
neg eax
sbb eax, eax
and ecx, 0xffffff7f
and eax, 0x80
or eax, ecx
mov dword [ebx + 0x26ca], eax
mov ecx, dword [0x52fe30]
movzx ecx, byte [ecx + 0x11640]
neg ecx
sbb ecx, ecx
and eax, 0xfffffeff
and ecx, 0x100
or ecx, eax
mov dword [ebx + 0x26ca], ecx
mov edx, dword [0x52fe30]
movzx eax, byte [edx + 0x1163c]
neg eax
sbb eax, eax
and ecx, 0xfffffdff
and eax, 0x200
or eax, ecx
mov dword [ebx + 0x26ca], eax
mov ecx, dword [0x52fe30]
call fcn.004532a0
sub eax, edi
je 0x41c35d
sub eax, edi
je 0x41c349
and dword [ebx + 0x26ca], 0xffffffe7
jmp 0x41c36f
mov ecx, dword [ebx + 0x26ca]
and ecx, 0xfffffff7
or ecx, 0x10
mov dword [ebx + 0x26ca], ecx
jmp 0x41c36f
mov edx, dword [ebx + 0x26ca]
and edx, 0xffffffef
or edx, 8
mov dword [ebx + 0x26ca], edx
movzx eax, byte [ebx + 0x1630]
mov ecx, dword [ebx + 0x26ca]
neg eax
push 0
sbb eax, eax
push 0
and ecx, 0xffffffbf
and eax, 0x40
or eax, ecx
push edi
push edi
mov ecx, ebx
mov dword [ebx + 0x26ca], eax
call fcn.004169e0
movzx edx, al
push edx
mov ecx, ebx
call fcn.0040d640
mov ecx, ebx
call fcn.00414900
mov edx, dword [ebx + 0x26ca]
xor ecx, ecx
test eax, eax
setne cl
and edx, 0xfffffffe
mov dword [ebx + 0xbe8], eax
xor eax, eax
or ecx, edx
mov dword [ebx + 0x26ca], ecx
cmp dword [ebx + 0xbf0], eax
je 0x41c3e8
mov ecx, dword [0x52fe30]
cmp byte [ecx + 0x1163e], al
setne al
lea eax, [eax + eax + 1]
lea edx, [ebx + 0xbf4]
mov dword [ebx + 0x27ee], eax
push edx
lea eax, [ebx + 0x27f2]
push eax
call fcn.00405470
mov ecx, dword [ebx + 0x120c]
lea edx, [ebx + 0x1210]
push edx
lea eax, [ebx + 0x29fe]
push eax
mov dword [ebx + 0x29fa], ecx
call fcn.00405470
lea ecx, [ebx + 0x1b4]
push ecx
lea edx, [ebx + 0x20ac]
push edx
call fcn.004128d0
mov eax, dword [ebx + 0x2090]
add esp, 0x18
mov esi, eax
test eax, eax
jne 0x41c447
mov esi, 0x4e5034
lea eax, [ebx + 0x22b6]
mov edx, 0x208
sub esi, eax
test edx, edx
je 0x41c471
movzx ecx, word [esi + eax]
test cx, cx
je 0x41c46d
mov word [eax], cx
add eax, 2
sub edx, edi
jne 0x41c454
jmp 0x41c471
test edx, edx
jne 0x41c474
sub eax, 2
lea edx, [ebx + 0x9dc]
push edx
xor ecx, ecx
push str.ComSpec
mov word [eax], cx
call fcn.004c6f20
mov eax, dword [0x52fe30]
add eax, 0x30
push edi
push eax
call fcn.004c8fb0
mov esi, dword [0x52fe30]
lea ecx, [ebx + 0x3be]
add esi, 0x30
push ecx
lea edx, [esi + 0x834]
push edx
call fcn.00405470
lea eax, [ebx + 0x5c8]
push eax
add esi, 0x62c
push esi
call fcn.00405470
mov ecx, dword [0x52fe30]
add ecx, 0x30
push edi
push ecx
call fcn.004c7cd0
mov esi, dword [0x52fe30]
add esi, 0x30
lea edi, [ebx + 0x2c06]
mov ecx, 0x28f
rep movsd dword es:[edi], dword [esi]
mov esi, dword [0x52fe30]
mov edi, dword [esi + 0x30]
add esp, 0x28
cmp byte [ebx + 0x1630], 0
je 0x41c50c
mov dword [ebp - 4], 1
jmp 0x41c512
mov edx, dword [esi + 0x34]
mov dword [ebp - 4], edx
push 0x208
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.004c9b50
push 0x208
lea ecx, [ebp - 0x210]
push 0
push ecx
call fcn.004c9b50
add esp, 0x18
cmp edi, 3
jne 0x41c6f2
lea eax, [esi + 0x44]
push 0x25
push eax
call fcn.004c9bca
add esp, 8
test eax, eax
je 0x41c661
mov eax, dword [0x52fe30]
push 0x104
lea edx, [ebp - 0x418]
push edx
add eax, 0x44
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x41c584
cmp eax, 0x104
jb 0x41c687
xor ecx, ecx
mov word [ebp - 0x418], cx
xor edx, edx
mov word [ebp - 0x210], dx
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebx + 0x2c1a]
push ecx
call fcn.00405470
add esp, 8
cmp word [ebp - 0x210], 0
jne 0x41c700
xor edi, edi
mov ecx, dword [0x52fe30]
add ecx, 0x24c
push ecx
lea edx, [ebx + 0x2e22]
push edx
call fcn.00405470
mov eax, dword [0x52fe30]
add eax, 0x454
push eax
lea ecx, [ebx + 0x302a]
push ecx
call fcn.00405470
mov edx, dword [ebp - 4]
add esp, 0x10
lea eax, [ebx + 0x274e]
push eax
mov ecx, ebx
mov dword [ebx + 0x2c06], edi
mov dword [ebx + 0x2c0a], edx
call fcn.00409340
xor eax, eax
cmp dword [ebx + 0x3648], eax
setne al
test eax, eax
jne 0x41c646
push eax
lea esi, [ebx + 0x3644]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.ConEmuGuiInfoMapping._u
mov ecx, esi
call fcn.00417d90
push 0xffffffffffffffff
push 1
push 1
mov ecx, esi
call fcn.00417e00
test eax, eax
je 0x41c65a
push 0xffffffffffffffff
lea ecx, [ebx + 0x2094]
push ecx
lea ecx, [ebx + 0x3644]
call fcn.0040d0e0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x52fe30]
add edx, 0x44
push edx
lea eax, [ebp - 0x418]
push eax
call fcn.00405470
add esp, 8
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [ebp - 0x418], 0
je 0x41c58d
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x210]
push eax
push 0x104
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x41c6e4
cmp eax, 0x104
jae 0x41c6e4
lea edx, [ebp - 0x418]
push 0
push edx
call fcn.004c5850
add esp, 8
test al, al
jne 0x41c596
xor eax, eax
mov word [ebp - 0x210], ax
jmp 0x41c596
xor ecx, ecx
mov word [ebp - 0x210], cx
jmp 0x41c596
xor edx, edx
mov word [ebx + 0x2c1a], dx
jmp 0x41c5bc
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebx + 0x2e22]
push ecx
call fcn.00405470
lea edx, [ebp - 0x210]
push edx
lea eax, [ebx + 0x302a]
push eax
jmp 0x41c5e7