Function at 0x417230
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4bf828
push eax
mov dword fs:[0], esp
sub esp, 0x438
push ebx
push esi
push edi
mov edi, 1
add dword [0x50b370], edi
mov ebx, ecx
mov dword [ebx + 0x2094], 0x7e
jne 0x417270
mov dword [0x50b370], edi
mov eax, dword [0x50b370]
mov dword [ebx + 0x2098], eax
mov ecx, dword [0x50b384]
mov dword [ebx + 0x209c], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebx + 0x20a0], eax
cmp dword [0x50bb90], 0
je 0x4172b2
mov eax, dword [0x50b3a4]
cmp dword [eax + 0xf2dbc], 0
je 0x4172b2
mov eax, dword [eax + 0x127d4]
jmp 0x4172b4
xor eax, eax
mov dword [ebx + 0x20a4], eax
mov eax, dword [0x50b3a0]
xor edx, edx
cmp byte [eax + 0x11818], dl
push 0
setne dl
mov dword [ebx + 0x28ce], edx
mov ecx, dword [0x50b3a0]
movzx eax, byte [ecx + 0xf40]
mov edx, dword [ebx + 0x28d2]
neg eax
sbb eax, eax
and edx, 0xfffffffd
and eax, 2
or eax, edx
mov dword [ebx + 0x28d2], eax
mov ecx, dword [0x50b3a0]
movzx edx, byte [ecx + 0x11819]
neg edx
sbb edx, edx
and edx, 4
and eax, 0xfffffffb
or edx, eax
mov dword [ebx + 0x28d2], edx
mov ecx, dword [0x50b3a0]
call fcn.00447b10
sub eax, edi
je 0x417346
sub eax, edi
je 0x417332
and dword [ebx + 0x28d2], 0xffffffe7
jmp 0x417358
mov eax, dword [ebx + 0x28d2]
and eax, 0xfffffff7
or eax, 0x10
mov dword [ebx + 0x28d2], eax
jmp 0x417358
mov ecx, dword [ebx + 0x28d2]
and ecx, 0xffffffef
or ecx, 8
mov dword [ebx + 0x28d2], ecx
movzx eax, byte [ebx + 0x162d]
mov edx, dword [ebx + 0x28d2]
neg eax
sbb eax, eax
and edx, 0xffffffbf
and eax, 0x40
or eax, edx
mov dword [ebx + 0x28d2], eax
mov ecx, dword [0x50b3a0]
movzx edx, byte [ecx + 0x11812]
neg edx
sbb edx, edx
and edx, 0x20
and eax, 0xffffffdf
push edi
or edx, eax
push edi
mov ecx, ebx
mov dword [ebx + 0x28d2], edx
call fcn.004068c0
movzx eax, al
lea ecx, [ebp - 0x10]
mov dword [ebx + 0x28d6], eax
call fcn.004a4720
lea ecx, [ebp - 0x10]
push 0
push ecx
mov dword [ebp - 4], 0
call fcn.0049f8f0
add esp, 8
test eax, eax
jl 0x4173e1
lea ecx, [ebp - 0x10]
call fcn.004a4800
mov ecx, eax
call fcn.004a4a70
mov ecx, eax
call fcn.00478be0
jmp 0x4173e3
xor eax, eax
lea ecx, [ebp - 0x10]
mov dword [ebx + 0x28da], eax
mov dword [ebp - 4], 0xffffffff
call fcn.004a4770
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, ebx
mov dword [ebx + 0x28de], eax
call fcn.00410790
xor edx, edx
test eax, eax
setne dl
mov dword [ebx + 0xbe8], eax
mov eax, dword [ebx + 0x28d2]
and eax, 0xfffffffe
or edx, eax
xor eax, eax
mov dword [ebx + 0x28d2], edx
cmp dword [ebx + 0xbf4], eax
je 0x417446
mov ecx, dword [0x50b3a0]
cmp byte [ecx + 0x1181b], al
setne al
lea eax, [eax + eax + 1]
lea edx, [ebx + 0xbf8]
mov dword [ebx + 0x2982], eax
push edx
lea eax, [ebx + 0x2986]
push eax
call fcn.0040f0b0
mov ecx, dword [ebx + 0x1210]
lea edx, [ebx + 0x1214]
push edx
lea eax, [ebx + 0x2b92]
push eax
mov dword [ebx + 0x2b8e], ecx
call fcn.0040f0b0
lea ecx, [ebx + 0x1b4]
push ecx
lea edx, [ebx + 0x20a8]
push edx
call fcn.0040eef0
mov eax, dword [ebx + 0x208c]
add esp, 0x18
mov esi, eax
test eax, eax
jne 0x4174a5
mov esi, 0x4c1318
lea eax, [ebx + 0x22b2]
mov edx, 0x208
sub esi, eax
test edx, edx
je 0x4174cf
movzx ecx, word [esi + eax]
test cx, cx
je 0x4174cb
mov word [eax], cx
add eax, 2
sub edx, edi
jne 0x4174b2
jmp 0x4174cf
test edx, edx
jne 0x4174d2
sub eax, 2
xor ecx, ecx
mov word [eax], cx
mov edx, dword [0x50b3a0]
movzx eax, byte [edx + 0xa6c]
mov dword [ebx + 0x28ca], eax
mov ecx, dword [0x50b3a4]
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea esi, [ebp - 0x30]
call fcn.0044e690
mov ecx, dword [0x50b3a0]
mov edi, eax
movzx eax, byte [ecx + 0xa6f]
sub eax, 1
je 0x417536
sub eax, 1
jne 0x417542
mov edx, 0x6e
mov word [ebp - 0x30], dx
jmp 0x41753f
mov eax, 0x63
mov word [ebp - 0x30], ax
lea esi, [ebp - 0x2e]
cmp byte [ecx + 0xa6e], 0
je 0x417553
mov ecx, 0x69
mov word [esi], cx
xor edx, edx
lea esi, [ebx + 0x26c2]
mov word [esi], dx
test edi, edi
je 0x417593
cmp word [edi], dx
je 0x417593
push str._config__
push 0x104
push esi
call fcn.00401880
push edi
push 0x104
push esi
call fcn.00401880
push 0x4c2924
push 0x104
push esi
call fcn.00401880
cmp word [ebp - 0x30], 0
je 0x4175b9
push str._new_console:
push 0x104
push esi
call fcn.00401880
lea eax, [ebp - 0x30]
push eax
push 0x104
push esi
call fcn.00401880
lea ecx, [ebx + 0x9dc]
push ecx
push str.ComSpec
call fcn.004adfc0
mov edx, dword [0x50b3a0]
add edx, 0x30
push edx
call fcn.004afc30
mov esi, dword [0x50b3a0]
lea eax, [ebx + 0x3be]
add esi, 0x30
push eax
lea ecx, [esi + 0x834]
push ecx
call fcn.0040f0b0
lea edx, [ebx + 0x5c8]
push edx
add esi, 0x62c
push esi
call fcn.0040f0b0
mov eax, dword [0x50b3a0]
add eax, 0x30
push 1
push eax
call fcn.004aeb60
mov esi, dword [0x50b3a0]
add esi, 0x30
lea edi, [ebx + 0x2d9a]
mov ecx, 0x28f
rep movsd dword es:[edi], dword [esi]
mov esi, dword [0x50b3a0]
mov edi, dword [esi + 0x30]
add esp, 0x24
cmp byte [ebx + 0x162d], 0
je 0x41764c
mov dword [ebp - 0x10], 1
jmp 0x417652
mov ecx, dword [esi + 0x34]
mov dword [ebp - 0x10], ecx
push 0x208
lea edx, [ebp - 0x444]
push 0
push edx
call fcn.004b03e0
push 0x208
lea eax, [ebp - 0x23c]
push 0
push eax
call fcn.004b03e0
add esp, 0x18
cmp edi, 3
jne 0x41783d
lea eax, [esi + 0x44]
push 0x25
push eax
call fcn.004b03ac
add esp, 8
test eax, eax
je 0x4177ac
mov edx, dword [0x50b3a0]
push 0x104
lea ecx, [ebp - 0x444]
push ecx
add edx, 0x44
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4176c5
cmp eax, 0x104
jb 0x4177d2
xor eax, eax
mov word [ebp - 0x444], ax
xor ecx, ecx
mov word [ebp - 0x23c], cx
lea edx, [ebp - 0x23c]
push edx
lea eax, [ebx + 0x2dae]
push eax
call fcn.0040f0b0
add esp, 8
cmp word [ebp - 0x23c], 0
jne 0x41784b
xor edi, edi
mov eax, dword [0x50b3a0]
add eax, 0x24c
push eax
lea ecx, [ebx + 0x2fb6]
push ecx
call fcn.0040f0b0
mov edx, dword [0x50b3a0]
add edx, 0x454
push edx
lea eax, [ebx + 0x31be]
push eax
call fcn.0040f0b0
mov ecx, dword [ebp - 0x10]
add esp, 0x10
lea edx, [ebx + 0x28e2]
mov dword [ebx + 0x2d9e], ecx
push edx
mov ecx, ebx
mov dword [ebx + 0x2d9a], edi
call fcn.004051c0
xor eax, eax
cmp dword [ebx + 0x37dc], eax
setne al
test eax, eax
jne 0x417787
push eax
lea esi, [ebx + 0x37d8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.ConEmuGuiInfoMapping._u
mov ecx, esi
call fcn.004135a0
push 0xffffffffffffffff
push 1
push 1
mov ecx, esi
call fcn.00413610
test eax, eax
je 0x41779b
push 0xffffffffffffffff
lea eax, [ebx + 0x2090]
push eax
lea ecx, [ebx + 0x37d8]
call fcn.00409520
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x50b3a0]
add ecx, 0x44
push ecx
lea edx, [ebp - 0x444]
push edx
call fcn.0040f0b0
add esp, 8
lea eax, [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [ebp - 0x444], 0
je 0x4176ce
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x23c]
push edx
push 0x104
lea eax, [ebp - 0x444]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x41782f
cmp eax, 0x104
jae 0x41782f
lea ecx, [ebp - 0x444]
push 0
push ecx
call fcn.004acca0
add esp, 8
test eax, eax
jne 0x4176d7
xor edx, edx
mov word [ebp - 0x23c], dx
jmp 0x4176d7
xor eax, eax
mov word [ebp - 0x23c], ax
jmp 0x4176d7
xor ecx, ecx
mov word [ebx + 0x2dae], cx
jmp 0x4176fd
lea edx, [ebp - 0x23c]
push edx
lea eax, [ebx + 0x2fb6]
push eax
call fcn.0040f0b0
lea ecx, [ebp - 0x23c]
push ecx
lea edx, [ebx + 0x31be]
push edx
jmp 0x417728