Function at 0x41fb10
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], 0x4365c0
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.004252a0
add esp, 4
cmp dword [esi + 0x58], 1
je 0x41fe24
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.00439140
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 0x41fc06
jmp 0x41fca0
cmp ebx, ecx
mov ecx, ebx
jb 0x41fd00
cmp ecx, 0x201
jb 0x41fca0
mov edi, ecx
mov eax, dword [esi + 8]
mov edx, dword [esi]
sub edi, dword [esi + 4]
sub eax, edx
cmp eax, edi
jae 0x41fc60
add edi, edx
mov dword [esi + 0xc], ecx
jb 0x41fdfa
mov eax, dword [esi + 8]
add eax, eax
cmp eax, edi
cmova edi, eax
mov ebx, edi
add ebx, edi
jb 0x41fdfa
test ebx, ebx
js 0x41fdfa
call sub.KERNEL32.dll_GetProcessHeap
cmp dword [esi + 8], 0
je 0x41fc6f
push ebx
push dword [esi + 0x20]
push 0
push eax
call sub.KERNEL32.dll_HeapReAlloc
mov ecx, dword [esi + 0xc]
test eax, eax
jne 0x41fc83
jmp 0x41fe16
mov ebx, dword [esi + 0x20]
mov dword [esi], ecx
mov eax, ecx
mov dword [esi + 4], ecx
mov dword [esi + 0x24], ecx
jmp 0x41fcac
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
mov ecx, dword [esi + 0xc]
test eax, eax
je 0x41fe16
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 0x41fcaa
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 0x41fcd5
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x41fdcf
cmp ebx, edi
mov ecx, edi
jne 0x41fbf0
mov edi, ecx
call sub.KERNEL32.dll_GetLastError
mov ecx, edi
cmp eax, 0x7a
jne 0x41fbf0
add ecx, ecx
cmp ecx, 0x201
jb 0x41fca0
jmp 0x41fc06
mov edx, dword [esi + 0x24]
mov eax, dword [esi]
mov ecx, dword [esi + 8]
mov dword [esi + 0x468], 0
cmp edx, ebx
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], ecx
jb 0x41fe8f
mov edx, dword [esi + 0xc]
lea ecx, [esi + 0x2c]
push ebx
call fcn.00423870
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 0x41fd59
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 0x41fd89
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 0x41fd92
jmp 0x41fda2
mov edi, dword [esi + 4]
cmp dword [esi + 0x44], 0
je 0x41fda2
call sub.KERNEL32.dll_GetProcessHeap
push dword [esi + 0x28]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
test ebx, ebx
jne 0x41fe2f
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 0x41fd49
jmp 0x41fd59
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.0040dd00
ud2
mov ecx, ebx
mov edx, 2
call fcn.0040dcf0
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], 0x4485e0
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], 0x425500
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, 0x4485f0
mov dword [esi + 0x38], 0x425730
call fcn.004259c0
jmp 0x41fe14
mov ecx, ebx
call fcn.0040ff00
jmp 0x41fe14