Function at 0x40c040
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ax, word [ebp - 0x28]
cmp ax, 9
jne 0x40c068
mov dword [0x42eb28], str.Windows_x64
jmp 0x40c082
mov dword [0x42eb28], str.Windows_IA64
cmp ax, 6
je 0x40c082
mov dword [0x42eb28], str.Windows_NT_x86
mov esi, dword [sym.imp.WINSPOOL.DRV_EnumMonitorsW]
push 0x42ef3c
push 0x42e91c
push 0
push 0
push 1
push 0
mov dword [0x42eb24], 0x42d408
mov dword [0x42eb2c], 0x426ca0
call esi
test eax, eax
jne 0x40c0c7
mov ecx, dword [0x42e91c]
push ecx
call fcn.0040e309
add esp, 4
mov edi, eax
jmp 0x40c0ca
mov edi, dword [ebp - 4]
mov edx, dword [0x42e91c]
push 0x42ef3c
push 0x42e91c
push edx
push edi
push 1
push 0
call esi
test eax, eax
je 0x40c243
xor eax, eax
mov dword [0x42eb20], edi
mov dword [0x42ed30], eax
cmp dword [0x42ef3c], eax
jbe 0x40c131
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
mov ecx, dword [0x42eb20]
mov edx, dword [ecx + eax*4]
push str.Brocadesoft_Mobile_Monitor
push edx
call esi
test eax, eax
je 0x40c1c4
mov eax, dword [0x42ed30]
inc eax
mov dword [0x42ed30], eax
cmp eax, dword [0x42ef3c]
jb 0x40c105
push 0x42eb24
push 2
push 0
call dword [sym.imp.WINSPOOL.DRV_AddMonitorW]
test eax, eax
jne 0x40c232
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.AddMonitor___error:
push 0x42d6f0
call fcn.0040d7e0
add esp, 0xc
push eax
call fcn.00409350
mov esi, eax
push 0xa
mov ecx, esi
call fcn.0040d650
mov edx, dword [esi]
mov eax, dword [edx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x40c198
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40c198
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40c1b9
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x40c1b1
or eax, 4
push 0
push eax
call fcn.004015f0
mov eax, 5
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.EnumMonitors___found_monitor_had_installed_
push 0x42d6f0
call fcn.0040d7e0
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.0040d650
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x40c206
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40c206
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40c227
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x40c21f
or eax, 4
push 0
push eax
call fcn.004015f0
mov eax, 2
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
call fcn.0040f98d
add esp, 4
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.EnumMonitors___error:
push 0x42d6f0
call fcn.0040d7e0
add esp, 0xc
push eax
call fcn.00409350
mov esi, eax
push 0xa
mov ecx, esi
call fcn.0040d650
mov edx, dword [esi]
mov eax, dword [edx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x40c293
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40c293
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40c2b4
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x40c2ac
or eax, 4
push 0
push eax
call fcn.004015f0
pop edi
mov eax, 4
pop esi
mov esp, ebp
pop ebp
ret