Function at 0x404d96
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
call fcn.00401046
mov esi, eax
mov edi, 0x400
push edi
push 0
lea ebx, [esi + 0x4ac]
push ebx
call fcn.0041bc70
add esp, 0xc
lea ecx, [esi + 0x3214]
push 0x433ce0
call fcn.00401b31
push edi
push ebx
mov ebx, 0x431bf0
lea ecx, [esi + 0x3214]
push ebx
push dword [0x428480]
push dword [0x42847c]
call fcn.00401d30
lea eax, [esi + 0x4ac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x404e8a
lea eax, [esi + 0x8ac]
push edi
push 0
push eax
call fcn.0041bc70
add esp, 0xc
lea ecx, [esi + 0x3214]
push edi
lea edi, [esi + 0x8ac]
push edi
push ebx
push dword [0x428488]
push dword [0x42847c]
call fcn.00401d30
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
call edi
test eax, eax
je 0x404e8a
mov ecx, dword [ebp - 8]
call fcn.004051cf
test al, al
je 0x404e8a
push 2
lea eax, [ebp - 2]
push 0
push eax
call fcn.0041bc70
add esp, 0xc
lea eax, [ebp - 2]
lea ecx, [esi + 0x3214]
push 2
push eax
push ebx
push dword [0x42848c]
push dword [0x42847c]
call fcn.00401d30
lea eax, [ebp - 2]
push eax
call edi
test eax, eax
jne 0x404e91
xor eax, eax
jmp 0x4051ca
xor eax, eax
mov dword [esi + 0xa8], eax
cmp dword [0x434bbc], eax
jne 0x404ec6
cmp dword [0x434bb8], eax
jne 0x404ec6
lea eax, [ebp - 2]
push 0x42d1ec
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x404ec6
mov dword [esi + 0xa8], 1
and byte [ebp - 0x10c], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x10b]
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x10c]
lea ecx, [esi + 0x3214]
push eax
push ebx
push dword [0x428490]
push dword [0x428494]
call fcn.00401d30
lea eax, [ebp - 0x10c]
mov dword [esi + 0x10b0], 0x1f40
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x404f2f
lea eax, [ebp - 0x10c]
push eax
call fcn.0041cbe7
pop ecx
mov dword [esi + 0x10b0], eax
and byte [ebp - 0x210], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x20f]
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x210]
mov edi, 0x42d1e8
push eax
push edi
push dword [0x4284a0]
lea ecx, [esi + 0x3214]
push dword [0x42847c]
call fcn.00401d30
lea eax, [ebp - 0x210]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push eax
call edi
test eax, eax
jne 0x404fa1
cmp dword [0x434bbc], eax
jne 0x404f98
cmp dword [0x434bb8], eax
jne 0x404f98
mov dword [esi + 4], eax
jmp 0x404fba
mov dword [esi + 4], 1
jmp 0x404fba
lea eax, [ebp - 0x210]
push 0x42d1e4
push eax
call edi
test eax, eax
je 0x404f98
mov dword [esi + 4], 2
and byte [ebp - 0x314], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x313]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x104
lea eax, [ebp - 0x314]
push edi
push eax
push 0x42d1ec
lea ecx, [esi + 0x3214]
push dword [0x4284a4]
push dword [0x42847c]
call fcn.00401d30
lea eax, [ebp - 0x314]
push 0x42d1ec
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x405016
mov byte [esi + 8], 1
jmp 0x40501a
and byte [esi + 8], 0
lea eax, [esi + 9]
push edi
push eax
push ebx
push dword [0x4284ac]
lea ecx, [esi + 0x3214]
push dword [0x42847c]
call fcn.00401d30
lea eax, [esi + 0x3b]
push edi
push eax
push ebx
push dword [0x4284a8]
lea ecx, [esi + 0x3214]
push dword [0x42847c]
call fcn.00401d30
lea eax, [esi + 0x6d]
push 0x32
push 0
push eax
call fcn.0041bc70
add esp, 0xc
lea eax, [esi + 0x6d]
lea ecx, [esi + 0x3214]
push edi
push eax
push ebx
push dword [0x4284b4]
push dword [0x42847c]
call fcn.00401d30
lea eax, [esi + 0x10b4]
push ebx
push eax
call fcn.0041bcd0
pop ecx
test eax, eax
pop ecx
jne 0x405108
lea eax, [esi + 0x10b4]
push 0x400
push eax
push ebx
push dword [0x428498]
lea ecx, [esi + 0x3214]
push dword [0x42847c]
call fcn.00401d30
push 0x400
call fcn.0041b768
mov dword [esp], 0x400
mov dword [ebp - 8], eax
push eax
lea eax, [esi + 0x10b4]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push dword [ebp - 8]
lea eax, [esi + 0x10b4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [esi + 0x14bc], 5
je 0x405108
lea eax, [esi + 0x10b4]
push 1
push eax
push 0x42d1e0
mov ecx, esi
call fcn.004140e0
cmp dword [esi + 0x14bc], 0
jne 0x405138
lea eax, [ebp - 0x418]
push edi
push eax
push 0
push dword [0x42849c]
lea ecx, [esi + 0x3214]
push dword [0x42847c]
call fcn.00405355
mov dword [esi + 0x14bc], eax
lea eax, [esi + 0x290c]
push 0x400
push 0
push eax
call fcn.0041bc70
add esp, 0xc
lea eax, [esi + 0x290c]
lea ecx, [esi + 0x3214]
push 0x400
push eax
push ebx
push dword [0x4284b0]
push dword [0x42847c]
call fcn.00401d30
lea eax, [esi + 0x2d0d]
push edi
push eax
push ebx
push str.DotNetVersion
lea ecx, [esi + 0x3214]
push dword [0x42847c]
call fcn.00401d30
lea edi, [esi + 0x2d0d]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jle 0x4051c7
cmp byte [edi], 0x31
jne 0x4051bf
cmp byte [esi + 0x2d0e], 0x2e
jne 0x4051bf
cmp byte [esi + 0x2d0f], 0x30
jne 0x4051bf
push 1
pop eax
jmp 0x4051c1
xor eax, eax
mov byte [esi + 0x2e11], al
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret