Function at 0x404360
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x44f00c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, ecx
xorps xmm0, xmm0
mov ecx, dword [ebp + 8]
lea ebx, [esi + 0x40]
movq qword [ebx], xmm0
mov dword [ebx + 8], 0
mov word [ebx + 0xc], 0
cmp dword [esi + 0x3c], 0
push edi
mov dword [esi + 0x6c], 0
jne 0x4043b7
mov eax, 0x80004002
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041aacd
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x38], 0
jne 0x40466a
mov eax, dword [esi + 0x34]
cmp eax, 3
je 0x4045cc
cmp eax, 5
je 0x4045cc
cmp eax, 8
jne 0x4043e6
mov dword [ebx], 0x3003
jmp 0x4045d2
mov eax, dword [ecx]
lea edx, [ebp - 0x21c]
push edx
xor ebx, ebx
mov dword [ebp - 0x21c], 0
push ebx
push 0x17
push 0x444480
xor edi, edi
push ecx
mov dword [ebp - 0x218], edi
call dword [eax + 0xc]
test eax, eax
js 0x4044b7
mov edi, 0x44f188
nop dword [eax]
mov eax, dword [ebp - 0x21c]
push 0
push edi
mov dword [edi + 4], 0xac44
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x1c]
test eax, eax
je 0x404456
mov eax, dword [ebp - 0x21c]
push 0
push edi
mov dword [edi + 4], 0xbb80
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x1c]
test eax, eax
js 0x40448c
mov ecx, dword [edi + 0x14]
mov eax, dword [esi + 0x6c]
shl ecx, 0xc
or ecx, dword [edi + 0x14]
mov dword [esi + eax*4 + 0x40], ecx
inc dword [esi + 0x6c]
mov eax, dword [edi + 0x14]
cmp eax, 3
jne 0x40447f
mov dword [ebp - 0x218], 1
jmp 0x40448c
cmp eax, 0x63f
mov eax, 1
cmove ebx, eax
add edi, 0x28
cmp edi, 0x44f250
jl 0x404420
mov ecx, dword [ebp - 0x21c]
test ecx, ecx
je 0x4044b1
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov dword [ebp - 0x21c], 0
mov edi, dword [ebp - 0x218]
lea eax, [ebp - 0x22c]
xorps xmm0, xmm0
push eax
push 0x4445b0
mov ecx, esi
movups xmmword [ebp - 0x22c], xmm0
call fcn.004039a0
test eax, eax
js 0x4044e5
mov cx, word [ebp - 0x22c]
cmp cx, 0x1f
je 0x4044ff
lea eax, [ebp - 0x22c]
mov ecx, esi
push eax
push 0x4445c4
call fcn.004039a0
mov cx, word [ebp - 0x22c]
test eax, eax
js 0x4045a6
mov dword [ebp - 0x218], 0
cmp cx, 0x1e
jne 0x40454a
push 0x104
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0x443fdc
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
jmp 0x404581
cmp cx, 0x1f
jne 0x4045a6
push 0x104
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x443fe0
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov eax, dword [ebp - 0x218]
add esp, 0xc
test eax, eax
je 0x4045a6
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [esi + 0x6c]
add esp, 4
mov dword [esi + eax*4 + 0x40], 0x40003003
inc dword [esi + 0x6c]
mov eax, dword [esi + 0x6c]
test edi, edi
je 0x4045bb
mov dword [esi + eax*4 + 0x40], 0x80003003
inc dword [esi + 0x6c]
mov eax, dword [esi + 0x6c]
test ebx, ebx
lea ebx, [esi + 0x40]
je 0x4045d8
mov dword [esi + eax*4 + 0x40], 0x8063f63f
jmp 0x4045d2
mov dword [ebx], 0x80003003
inc dword [esi + 0x6c]
mov eax, dword [esi + 0x6c]
xor edi, edi
test eax, eax
je 0x40466a
push edi
push ecx
mov edx, str.mSupportedSpeakerConfigs_
mov ecx, 0x451a80
call fcn.00409a50
add esp, 4
mov ecx, eax
call fcn.00405b80
mov edx, 0x443fbc
mov ecx, eax
call fcn.00409a50
mov edx, eax
test edx, edx
jne 0x404613
xor ecx, ecx
jmp 0x40461a
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff9ff
or eax, 0x800
mov dword [ecx + 0x14], eax
mov ecx, edx
push dword [ebx]
call fcn.00405b80
mov edx, eax
test edx, edx
jne 0x40463d
xor ecx, ecx
jmp 0x404644
mov eax, dword [edx]
mov ecx, dword [eax + 4]
add ecx, edx
mov eax, dword [ecx + 0x14]
and eax, 0xfffff3ff
or eax, 0x200
push edx
mov dword [ecx + 0x14], eax
call fcn.0040a070
inc edi
add esp, 4
add ebx, 4
cmp edi, dword [esi + 0x6c]
jb 0x4045e2
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041aacd
mov esp, ebp
pop ebp
ret 4