Function at 0x413a10
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x470
mov esi, esp
mov dword [esi + 0x458], ebp
mov dword [esi + 0x45c], esp
mov dword [esi + 0x468], 0xffffffff
mov dword [esi + 0x464], 0x41fc10
mov ebx, dword [ebp + 8]
mov dword [esi + 0x3c], ecx
lea edi, [esi + 0x58]
lea ecx, [esi + 0x460]
mov eax, dword fs:[0]
mov dword [esi + 0x460], eax
mov dword fs:[0], ecx
mov dword [esi + 0x50], edx
mov dword [esi + 0x54], ebx
mov ecx, edi
push ebx
call fcn.00419430
add esp, 4
cmp dword [esi + 0x58], 1
je 0x413d24
mov eax, dword [esi + 0x64]
movsd xmm0, qword [esi + 0x5c]
mov dword [esi + 0x48], eax
movsd qword [esi + 0x40], xmm0
push 0x400
push 0
push edi
call fcn.00420e00
add esp, 0xc
mov eax, dword [esi + 0x40]
mov ecx, 0x200
mov dword [esi + 0x10], 2
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 8], 0
mov dword [esi + 0x20], 2
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 0x28], eax
cmp ecx, 0x201
jae 0x413b06
jmp 0x413ba0
cmp ebx, ecx
mov ecx, ebx
jb 0x413c00
cmp ecx, 0x201
jb 0x413ba0
mov edi, ecx
mov eax, dword [esi + 8]
mov edx, dword [esi]
sub edi, dword [esi + 4]
sub eax, edx
cmp eax, edi
jae 0x413b60
add edi, edx
mov dword [esi + 0xc], ecx
jb 0x413cfa
mov eax, dword [esi + 8]
add eax, eax
cmp edi, eax
cmovb edi, eax
mov ebx, edi
add ebx, edi
jb 0x413cfa
test ebx, ebx
js 0x413cfa
call sub.KERNEL32.dll_GetProcessHeap
cmp dword [esi + 8], 0
je 0x413b6f
push ebx
push dword [esi + 0x20]
push 0
push eax
call sub.KERNEL32.dll_HeapReAlloc
mov ecx, dword [esi + 0xc]
test eax, eax
jne 0x413b83
jmp 0x413d16
mov ebx, dword [esi + 0x20]
mov dword [esi], ecx
mov eax, ecx
mov dword [esi + 4], ecx
mov dword [esi + 0x24], ecx
jmp 0x413bac
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
mov ecx, dword [esi + 0xc]
test eax, eax
je 0x413d16
mov dword [esi + 0x10], eax
mov dword [esi + 8], edi
mov dword [esi], ecx
mov edx, ecx
mov dword [esi + 4], ecx
mov dword [esi + 0x24], ecx
mov dword [esi + 0x20], eax
jmp 0x413baa
lea eax, [esi + 0x58]
mov dword [esi + 0x24], 0x200
mov ebx, eax
mov edi, ecx
push 0
call sub.KERNEL32.dll_SetLastError
push edi
mov dword [esi + 0xc], ebx
push ebx
push dword [esi + 0x28]
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov ebx, eax
test eax, eax
jne 0x413bd5
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x413ccf
cmp ebx, edi
mov ecx, edi
jne 0x413af0
mov edi, ecx
call sub.KERNEL32.dll_GetLastError
mov ecx, edi
cmp eax, 0x7a
jne 0x413af0
add ecx, ecx
cmp ecx, 0x201
jb 0x413ba0
jmp 0x413b06
mov edx, dword [esi + 0x24]
mov eax, dword [esi]
mov ecx, dword [esi + 8]
cmp edx, ebx
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], ecx
jb 0x413d8f
mov edx, dword [esi + 0xc]
mov dword [esi + 0x468], 0
lea ecx, [esi + 0x2c]
push ebx
call fcn.00417a40
add esp, 4
mov eax, dword [esi + 0x2c]
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x34]
mov ebx, dword [esi + 8]
xor edi, edi
mov dword [esi], eax
mov dword [esi + 4], edx
mov dword [esi + 0xc], ecx
test ebx, ebx
je 0x413c59
call sub.KERNEL32.dll_GetProcessHeap
push dword [esi + 0x20]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
xor ebx, ebx
test edi, edi
je 0x413c89
mov ebx, dword [esi]
mov edi, dword [esi + 4]
test bl, bl
sete al
cmp edi, 0xcb
sete cl
xor edx, edx
and cl, al
cmovne ebx, edx
xor cl, 1
mov dword [esi], ebx
movzx ebx, cl
cmp dword [esi + 0x44], 0
jne 0x413c92
jmp 0x413ca2
mov edi, dword [esi + 4]
cmp dword [esi + 0x44], 0
je 0x413ca2
call sub.KERNEL32.dll_GetProcessHeap
push dword [esi + 0x28]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
test ebx, ebx
jne 0x413d2f
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi]
mov dword [eax], ecx
mov ecx, dword [esi + 0xc]
mov dword [eax + 4], edi
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0x460]
mov dword fs:[0], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esi]
mov ebx, dword [esi + 8]
mov edi, 1
mov dword [esi], 0
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], ebx
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 4], eax
test ebx, ebx
jne 0x413c49
jmp 0x413c59
mov eax, dword [esi]
mov ecx, dword [esi + 8]
mov dword [esi + 0x468], 0
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], ecx
call fcn.00404cf0
ud2
mov ecx, ebx
mov edx, 2
call fcn.00404cd0
ud2
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x60]
mov dword [esi], eax
mov dword [esi + 4], ecx
mov eax, dword [esi]
mov edx, dword [esi + 4]
lea ecx, [esi + 0x50]
mov dword [esi + 0x58], 0x431a78
mov dword [esi + 0x5c], 2
mov dword [esi + 0x60], 0
mov dword [esi + 0x468], 1
mov dword [esi + 0x2c], ecx
lea ecx, [esi + 0x2c]
mov dword [esi + 0x30], 0x419890
mov dword [esi + 0x68], ecx
lea ecx, [esi + 0x58]
mov dword [esi + 0x6c], 2
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
lea edx, [esi + 0x10]
mov dword [esi + 0x34], edx
mov edx, 0x431a88
mov dword [esi + 0x38], 0x4198b0
call fcn.00419b40
jmp 0x413d14
mov ecx, ebx
call fcn.00406d70
ud2