Function at 0x1037596
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1038
call fcn.0106f850
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
push edi
xor edi, edi
xor ebx, ebx
inc edi
cmp eax, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], edi
je 0x10375c2
push eax
call fcn.0103743a
mov dword [esi], ebx
mov esi, dword [ebp + 8]
cmp esi, ebx
jne 0x10375fe
push 0x104
lea eax, [ebp - 0x1038]
push eax
push 0x1005e1c
lea esi, [ebp - 0x1038]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1037611
lea eax, [ebp - 0x1038]
push 0x1005dfc
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push ebx
push 2
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupOpenInfFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
jne 0x1037619
mov ax, di
jmp 0x103782c
mov esi, dword [sym.imp.SETUPAPI.dll_SetupGetIntField]
jmp 0x1037624
xor edi, edi
inc edi
cmp word [ebp - 0xc], bx
lea eax, [ebp - 0x1c]
push eax
je 0x1037647
mov eax, dword [ebp - 4]
push ebx
push dword [eax*4 + 0x10cd8cc]
push dword [ebp - 0x20]
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
mov dword [ebp - 8], edi
jmp 0x1037654
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
inc dword [ebp - 8]
cmp ax, bx
je 0x103780a
push ebx
push 0x800
lea eax, [ebp - 0x1038]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0xc], ebx
call dword [sym.imp.SETUPAPI.dll_SetupGetLineTextW]
test ax, ax
je 0x1037624
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x1c]
push eax
call esi
cmp dword [ebp - 4], ebx
jne 0x1037624
xor eax, eax
push 0x7f
pop edx
mov word [ebp - 0x838], bx
mov ecx, edx
lea edi, [ebp - 0x836]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x638], bx
mov ecx, edx
lea edi, [ebp - 0x636]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x438], bx
mov ecx, edx
lea edi, [ebp - 0x436]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x238], bx
mov ecx, edx
lea edi, [ebp - 0x236]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x38]
push eax
push 1
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp + 8], ebx
call esi
lea eax, [ebp - 0x30]
push eax
push 2
lea eax, [ebp - 0x1c]
push eax
call esi
lea eax, [ebp - 0x28]
push eax
push 3
lea eax, [ebp - 0x1c]
push eax
call esi
lea eax, [ebp - 0x34]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
call esi
lea eax, [ebp - 0x2c]
push eax
push 5
lea eax, [ebp - 0x1c]
push eax
call esi
lea eax, [ebp - 0x24]
push eax
push 6
lea eax, [ebp - 0x1c]
push eax
call esi
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
push ebx
push 0x200
lea eax, [ebp - 0x438]
push eax
push 7
lea eax, [ebp - 0x1c]
push eax
call edi
push ebx
push 0x200
lea eax, [ebp - 0x838]
push eax
push 8
lea eax, [ebp - 0x1c]
push eax
call edi
push ebx
push 0x200
lea eax, [ebp - 0x638]
push eax
push 9
lea eax, [ebp - 0x1c]
push eax
call edi
push ebx
push 0x200
lea eax, [ebp - 0x238]
push eax
push 0xa
lea eax, [ebp - 0x1c]
push eax
call edi
cmp word [ebp - 0x238], bx
je 0x10377b1
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x438]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
mov dword [ebp + 8], 1
push dword [ebp + 8]
lea eax, [ebp - 0x438]
push dword [ebp - 0x34]
push eax
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x838]
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x30]
push dword [ebp + 0xc]
call fcn.01037350
mov edi, eax
cmp edi, ebx
je 0x1037621
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 8]
push ebx
push 0x400
push ebx
push eax
mov dword [edi], ecx
call fcn.0106f990
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], edx
mov eax, dword [ebp - 0x2c]
mov dword [edi + 0x20], eax
jmp 0x1037621
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp dword [eax*4 + 0x10cd8cc], ebx
mov dword [ebp - 0xc], edi
jne 0x1037624
push dword [ebp - 0x20]
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
xor ax, ax
pop edi
pop esi
pop ebx
leave
ret 8