Function at 0x40d920
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57a9ec
mov eax, dword fs:[0]
push eax
sub esp, 0x510
mov eax, dword [0x5e3fe4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4e8], edi
mov dword [ebp - 0x4d0], 0
mov ecx, 0x18
mov eax, 0x5ed3b8
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40d970
mov ecx, 0x30
mov eax, 0x5ed358
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40d985
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
xorps xmm0, xmm0
mov dword [0x5ed354], 0x20
test byte [edi + 0xed8], 1
je 0x40da6e
xor eax, eax
mov dword [ebp - 0x4c4], ecx
mov word [ebp - 0x4a0], ax
mov word [ebp - 0x4c0], ax
mov dword [ebp - 0x4fc], eax
lea eax, [ebp - 0x51c]
push eax
movups xmmword [ebp - 0x51c], xmm0
movups xmmword [ebp - 0x50c], xmm0
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movzx eax, word [ebp - 0x51c]
cmp eax, 6
je 0x40d9f8
cmp eax, 9
jne 0x40da0e
push 1
lea ecx, [ebp - 0x4c4]
call fcn.004096d0
cmp dword [ebp - 0x4c4], 0
jne 0x40da28
push 0
lea ecx, [ebp - 0x4c4]
call fcn.004096d0
cmp dword [ebp - 0x4c4], 0
je 0x40dfde
lea eax, [ebp - 0x4c0]
push eax
push 0x18
push 0x5ed3b8
call fcn.0055b621
cmp dword [ebp - 0x4c4], 1
mov ecx, 0x40
mov eax, 0x20
cmove eax, ecx
push eax
push 0x5ed3b8
push str.Microsoft_Excel__s___d_bit
push 0x5ed358
mov dword [0x5ed354], eax
call esi
add esp, 0x1c
jmp 0x40dfde
lea eax, [ebp - 0x4f8]
push eax
movups xmmword [ebp - 0x4f8], xmm0
call dword [sym.imp.OLEAUT32.dll_VariantClear]
push str.xlversion.vbs
mov dword [ebp - 4], 0
mov esi, dword [edi + 0xd4]
push esi
push ecx
call fcn.004076c0
lea eax, [ebp - 0x4f8]
mov ecx, edi
push eax
sub esp, 8
push str.xlversion
push esi
call fcn.0040d770
test al, al
je 0x40de3a
mov esi, dword [ebp - 0x4f0]
test esi, esi
je 0x40dad1
mov ecx, esi
call fcn.004041a0
mov esi, dword [ebp - 0x4f0]
call fcn.0040b780
mov ecx, eax
test ecx, ecx
je 0x40e075
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x4cc], eax
push esi
lea ecx, [ebp - 0x4cc]
mov byte [ebp - 4], 1
call fcn.00413790
test al, al
jne 0x40db2d
test esi, esi
jne 0x40db0c
xor ecx, ecx
jmp 0x40db20
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40db11
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x4cc]
call fcn.00407390
mov byte [ebp - 4], 2
call fcn.0040b780
mov ecx, eax
test ecx, ecx
je 0x40e07f
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x4e0], eax
xor eax, eax
mov byte [ebp - 4], 3
mov edi, dword [ebp - 0x4cc]
mov dword [ebp - 0x4d4], eax
mov dword [ebp - 0x4c8], eax
nop dword [eax + eax]
mov ecx, dword [ebp - 0x4d0]
lea esi, [edi + eax*2]
mov eax, dword [edi - 0xc]
mov dword [ebp - 0x4d0], ecx
lea eax, [edi + eax*2]
mov dword [ebp - 0x4e4], eax
cmp esi, eax
jae 0x40dbef
push 0x5c4b54
push esi
call fcn.00558c17
mov dword [ebp - 0x4dc], eax
add esp, 8
lea eax, [esi + eax*2]
cmp eax, dword [ebp - 0x4e4]
jae 0x40dbef
push 0x5c4b54
push eax
call fcn.00558bbe
mov ecx, dword [ebp - 0x4dc]
add esp, 8
add ecx, dword [ebp - 0x4d4]
push eax
lea edx, [ecx + 1]
add edx, eax
lea eax, [ebp - 0x4d8]
push ecx
push eax
lea ecx, [ebp - 0x4cc]
mov dword [ebp - 0x4d4], edx
call fcn.004138c0
mov esi, dword [ebp - 0x4d8]
jmp 0x40dc34
mov ecx, dword [edi - 0x10]
or edx, 0xffffffff
mov dword [ebp - 0x4d4], edx
test ecx, ecx
je 0x40dc0c
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
mov ecx, eax
test ecx, ecx
jne 0x40dc24
call fcn.0040b780
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx + 0x10]
call eax
mov ecx, eax
test ecx, ecx
je 0x40e075
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x4d8], esi
or dword [ebp - 0x4d0], 1
lea eax, [ebp - 0x4d8]
push eax
lea ecx, [ebp - 0x4e0]
mov byte [ebp - 4], 5
call fcn.00406840
mov byte [ebp - 4], 3
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40dc6d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x4e0]
mov ecx, 0x5c3120
mov eax, esi
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40dca6
test dx, dx
je 0x40dca2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40dca6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40dc80
xor eax, eax
jmp 0x40dcab
sbb eax, eax
or eax, 1
test eax, eax
je 0x40de02
mov eax, dword [ebp - 0x4c8]
inc eax
mov dword [ebp - 0x4c8], eax
sub eax, 1
je 0x40dd56
sub eax, 1
je 0x40dd41
sub eax, 1
jne 0x40ddef
cmp dword [esi - 0xc], eax
jl 0x40ddef
push 0x5c4b58
push esi
call fcn.00550dbe
add esp, 8
test eax, eax
je 0x40dd08
sub eax, esi
mov ecx, 0x20
sar eax, 1
mov eax, dword [0x5ed354]
cmovns eax, ecx
mov dword [0x5ed354], eax
cmp dword [esi - 0xc], 0
jl 0x40ddef
push 0x5c4b60
push esi
call fcn.00550dbe
add esp, 8
test eax, eax
je 0x40ddef
sub eax, esi
sar eax, 1
js 0x40ddef
mov dword [0x5ed354], 0x40
jmp 0x40ddef
push esi
push 0x30
push 0x5ed358
call fcn.0055b621
add esp, 0xc
jmp 0x40ddef
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40dd60
sub ecx, edx
sar ecx, 1
lea eax, [ecx - 1]
test eax, eax
js 0x40dd9f
test eax, eax
js 0x40e089
cmp eax, dword [esi - 0xc]
jg 0x40e089
movzx ecx, word [esi + eax*2]
cmp ecx, 0x30
jb 0x40dd95
cmp ecx, 0x39
jbe 0x40dd9a
cmp ecx, 0x2e
jne 0x40ddef
sub eax, 1
jns 0x40dd76
push esi
push 0x18
push 0x5ed3b8
call fcn.0055b621
mov ax, word [0x5ed3b8]
add esp, 0xc
xor edx, edx
xor esi, esi
test ax, ax
je 0x40dde7
movzx ecx, ax
movzx eax, cx
cmp eax, 0x2e
je 0x40dde2
lea ecx, [edx - 6]
inc esi
lea ecx, [edx + ecx*4]
lea edx, [eax + ecx*2]
movzx eax, word [esi*2 + 0x5ed3b8]
mov ecx, eax
test ax, ax
jne 0x40ddc1
cmp edx, 0xb
jg 0x40ddef
xor eax, eax
mov word [0x5ed3b8], ax
mov eax, dword [ebp - 0x4d4]
test eax, eax
js 0x40e089
jmp 0x40db70
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40de1e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40de3a
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
cmp word [0x5ed358], 0
je 0x40de52
cmp word [0x5ed3b8], 0
jne 0x40dfbe
xor eax, eax
mov ecx, str.to_get_xl_version_from_registry
mov word [0x5ed358], ax
mov word [0x5ed3b8], ax
mov dword [0x5ed354], eax
call fcn.004041a0
xor eax, eax
lea edx, [ebp - 0x90]
push ecx
xor cl, cl
mov word [ebp - 0x90], ax
call fcn.00409aa0
add esp, 4
cmp word [ebp - 0x90], 0
jne 0x40deb2
push ecx
lea edx, [ebp - 0x90]
mov cl, 1
call fcn.00409aa0
add esp, 4
cmp word [ebp - 0x90], 0
je 0x40dfa2
lea ecx, [ebp - 0x90]
call fcn.004041a0
lea esi, [ebp - 0x90]
xor edi, edi
lea ecx, [esi + 2]
nop dword [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40ded0
sub esi, ecx
xor eax, eax
sar esi, 1
xor edx, edx
mov dword [ebp - 0x4c8], eax
test esi, esi
jle 0x40df6a
movzx eax, word [ebp + eax*2 - 0x90]
cmp eax, 0x7c
jne 0x40df03
inc edi
xor edx, edx
jmp 0x40df59
test edi, edi
jne 0x40df21
cmp edx, 0x17
jge 0x40df59
mov word [edx*2 + 0x5ed3b8], ax
inc edx
xor eax, eax
mov word [edx*2 + 0x5ed3b8], ax
jmp 0x40df59
cmp edi, 1
jne 0x40df40
cmp edx, 0x2f
jge 0x40df59
mov word [edx*2 + 0x5ed358], ax
inc edx
xor eax, eax
mov word [edx*2 + 0x5ed358], ax
jmp 0x40df59
cmp edi, 2
jne 0x40df59
mov ecx, dword [0x5ed354]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*2]
add eax, 0xffffffd0
mov dword [0x5ed354], eax
mov eax, dword [ebp - 0x4c8]
inc eax
mov dword [ebp - 0x4c8], eax
cmp eax, esi
jl 0x40def1
mov ecx, 0x5ed358
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40df72
push dword [0x5ed354]
sub ecx, edx
sar ecx, 1
push 0x5ed3b8
push str.__s___d_bit
lea eax, [ecx*2 + 0x5ed358]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp word [0x5ed358], 0
je 0x40e04d
cmp word [0x5ed3b8], 0
je 0x40e04d
lea eax, [ebp - 0x4f8]
mov dword [ebp - 4], 0xffffffff
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov edi, dword [ebp - 0x4e8]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push 0x104
lea eax, [ebp - 0x298]
mov ecx, edi
push eax
call fcn.004246a1
lea edx, [ebp - 0x298]
lea ecx, [edx + 2]
nop word [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40e000
sub edx, ecx
mov eax, str.__self_enable
sar edx, 1
mov ecx, 0x5c3120
test byte [0x5ed3e8], 0x20
cmove eax, ecx
push eax
push 0x5ed358
lea eax, [ebp - 0x298]
lea eax, [eax + edx*2]
push str.___Target:___s_s_
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x298]
mov ecx, edi
push eax
call fcn.004249cb
jmp 0x40e05a
lea eax, [ebp - 0x4f8]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054e183
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00407340
push 0x80004005
call fcn.00407340
push 0x80070057
call fcn.00407340
int3