Function at 0x409320
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x435e8c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x10], 0x24
mov dword [ebp - 0xc], 0x26
mov dword [ebp - 8], 0x2a
mov dword [ebp - 0x40], 3
mov dword [ebp - 0x18], 0
cmp dword [0x438718], 0
jne 0x409406
push 3
push 0x20
push 3
push 1
push 3
push 2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
mov dword [0x438718], 0x11c
mov dword [0x43871c], 6
mov dword [0x438720], 1
xor eax, eax
mov word [0x43882c], ax
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x50]
push edx
push 0x23
push 0x438718
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
je 0x4093f7
mov dword [ebp - 0x34], 0
jmp 0x4093fe
mov dword [ebp - 0x34], 1
mov eax, dword [ebp - 0x34]
mov dword [0x4358a8], eax
cmp dword [0x4358a8], 0
je 0x409419
mov eax, 1
jmp 0x409623
cmp dword [ebp + 8], 0
jne 0x409424
jmp 0x40960c
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x409442
jmp 0x40960c
mov edx, dword [ebp - 0x20]
shl edx, 1
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x40945e
jmp 0x40960c
push 0
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x38]
ja 0x409482
jmp 0x40960c
mov dword [ebp - 0x18], 0
jmp 0x409494
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x40]
jge 0x40960c
mov eax, dword [ebp - 0x18]
cmp dword [ebp + eax*4 - 0x10], 0x26
jne 0x409571
push 0
push 0
push 0x4358ac
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4094df
mov ecx, dword [ebp - 0x1c]
lea edx, [ecx + ecx + 2]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4094e9
jmp 0x40960c
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push 0x4358e8
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp dword [ebp - 0x1c], eax
je 0x409508
jmp 0x40960c
mov edx, dword [ebp - 0x14]
push edx
push str._ProgramW6432_
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40954a
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x438840
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + ecx*4 - 0x10]
push edx
call fcn.00407f50
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x409548
jmp 0x40960c
jmp 0x40956f
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx + eax*2 - 4]
cmp edx, 0x5c
je 0x40956f
push 0x435970
mov eax, dword [ebp - 0x1c]
add eax, 1
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00409e40
jmp 0x409591
push 0x438844
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + edx*4 - 0x10]
push eax
call fcn.00407f50
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x409591
jmp 0x40960c
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
add edx, 2
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x24]
mov cx, word [eax]
mov word [ebp - 0x2a], cx
add dword [ebp - 0x24], 2
cmp word [ebp - 0x2a], 0
jne 0x4095a0
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x44]
sar edx, 1
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.00412f14
add esp, 0xc
test eax, eax
je 0x4095e1
mov dword [ebp - 0x3c], 0
jmp 0x4095e8
mov dword [ebp - 0x3c], 1
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4095f6
jmp 0x40960c
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x14], 0
jmp 0x40948b
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040bec3
mov esp, ebp
pop ebp
ret