Function at 0x40e7b0
Capabilities:
Check os version
Parse pe header
Query or enumerate registry value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f130d
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x53ba20]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
push 1
mov dword [0x53ffd4], edi
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, dword [0x54000c]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40e809
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
mov esi, dword [ebp + 8]
test esi, 0x100
je 0x40e8f3
mov dword [0x53ff7c], 0x100
cmp edi, 2
je 0x40e830
cmp edi, 1
jne 0x40e8b6
push 0x4fcb54
push 0x4fcb70
push dword [0x534a0c]
push 0
call fcn.00413ec0
add esp, 0x10
cmp edi, 2
je 0x40e854
cmp edi, 1
jne 0x40e8b6
push 0x4fcbd4
push 0x4fcb70
push dword [0x534a0c]
push 0
call fcn.00413ec0
add esp, 0x10
cmp edi, 2
je 0x40e878
cmp edi, 1
jne 0x40e8b6
push 0x4fcbf0
push 0x4fcb70
push dword [0x534a0c]
push 0
call fcn.00413ec0
add esp, 0x10
cmp edi, 2
je 0x40e89c
cmp edi, 1
jne 0x40e8b6
push 0x4fcc00
push 0x4fcb70
push dword [0x534a0c]
push 0
call fcn.00413ec0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov cx, ax
shr cx, 8
cmp al, 6
jne 0x40e8f3
cmp cx, 1
jb 0x40e8f3
cmp edi, 2
je 0x40e8d7
cmp edi, 1
jne 0x40e8f3
push 0x20
push 0x4fcc24
push 0x4fcc68
push dword [0x534a0c]
push 0
call fcn.0040de60
add esp, 0x14
test esi, 0x40000
je 0x40e90f
push 0
mov dword [0x53ff7c], 0x40000
call fcn.004245a0
add esp, 4
test esi, 0x80000
je 0x40f30e
mov dword [0x53ff7c], 0x80000
cmp edi, 2
je 0x40e92f
cmp edi, 1
jne 0x40e979
push 0x4fccb0
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40e97d
test edi, edi
jne 0x40e9c2
push 0x4fccb0
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 1
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40e9dc
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40e9e6
cmp edi, 1
jne 0x40ea30
push 0x4fcd08
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 2
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40ea34
test edi, edi
jne 0x40ea79
push 0x4fcd08
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 3
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40ea93
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40ea9d
cmp edi, 1
jne 0x40eae7
push 0x4fcd78
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 4
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40eaeb
test edi, edi
jne 0x40eb30
push 0x4fcd78
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 5
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40eb4a
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40eb54
cmp edi, 1
jne 0x40eb9e
push 0x4fcdc8
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 6
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40eba2
test edi, edi
jne 0x40ebe7
push 0x4fcdc8
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 7
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40ec01
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40ec0b
cmp edi, 1
jne 0x40ec55
push 0x4fce30
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 8
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40ec59
test edi, edi
jne 0x40ec9e
push 0x4fce30
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 9
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40ecb8
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40ecc2
cmp edi, 1
jne 0x40ed0c
push 0x4fce88
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0xa
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40ed10
test edi, edi
jne 0x40ed55
push 0x4fce88
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0xb
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40ed6f
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40ed79
cmp edi, 1
jne 0x40edc3
push 0x4fcef8
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0xc
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40edc7
test edi, edi
jne 0x40ee0c
push 0x4fcef8
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0xd
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40ee26
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40ee30
cmp edi, 1
jne 0x40ee7a
push 0x4fcf48
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0xe
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40ee7e
test edi, edi
jne 0x40eec3
push 0x4fcf48
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0xf
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40eedd
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40eee7
cmp edi, 1
jne 0x40ef31
push 0x4fcfb0
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x10
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40ef35
test edi, edi
jne 0x40ef7a
push 0x4fcfb0
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x11
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40ef94
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40ef9e
cmp edi, 1
jne 0x40efe8
push 0x4fd000
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x12
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40efec
test edi, edi
jne 0x40f031
push 0x4fd000
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x13
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40f04b
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40f055
cmp edi, 1
jne 0x40f09f
push 0x4fd068
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x14
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40f0a3
test edi, edi
jne 0x40f0e8
push 0x4fd068
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x15
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40f102
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40f10c
cmp edi, 1
jne 0x40f156
push 0x4fd0c0
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x16
push eax
push dword [0x534a0c]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40f15a
test edi, edi
jne 0x40f19f
push 0x4fd0c0
mov dword [ebp + 0xc], 0
call fcn.004c8c20
push 0
mov dword [ebp + 0xc], eax
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x17
push eax
push dword [0x534a10]
push 0
call fcn.0041d620
push dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40f1b9
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40f1c3
cmp edi, 1
jne 0x40f206
push 0x4fd130
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp + 0xc], esi
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x18
push eax
push dword [0x534a0c]
push 0
call fcn.0040b8e0
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40f20a
test edi, edi
jne 0x40f248
push 0x4fd130
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp + 0xc], esi
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x19
push eax
push dword [0x534a10]
push 0
call fcn.0040b8e0
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40f262
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40f26c
cmp edi, 1
jne 0x40f2af
push 0x4fd130
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp + 0xc], esi
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x1a
push eax
push dword [0x534a0c]
push 0
call fcn.0040b8e0
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40f2b3
test edi, edi
jne 0x40f2f1
push 0x4fd130
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp + 0xc], esi
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x1b
push eax
push dword [0x534a10]
push 0
call fcn.0040b8e0
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
mov eax, dword [0x54000c]
test eax, eax
je 0x40f30b
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
mov esi, dword [ebp + 8]
test esi, 0x200
je 0x40f5da
mov dword [0x53ff7c], 0x200
cmp edi, 2
je 0x40f32e
cmp edi, 1
jne 0x40f345
push 1
push 0x4fd188
push dword [0x534a0c]
push 0
call fcn.00419700
add esp, 0x10
mov eax, dword [0x54000c]
test eax, eax
je 0x40f35f
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40f369
cmp edi, 1
jne 0x40f380
push 1
push 0x4fd220
push dword [0x534a0c]
push 0
call fcn.00419700
add esp, 0x10
mov eax, dword [0x54000c]
test eax, eax
je 0x40f39a
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40f3a4
cmp edi, 1
jne 0x40f3c0
push 0x2c
push 0x4fd2cc
push 0x4fd2e0
push dword [0x534a0c]
push 0
call fcn.0040de60
add esp, 0x14
mov eax, dword [0x54000c]
test eax, eax
je 0x40f3da
push 1
call eax
push 0x200
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40f3e4
cmp edi, 1
jne 0x40f400
push 0x2c
push 0x4fd2cc
push 0x4fd330
push dword [0x534a0c]
push 0
call fcn.0040de60
add esp, 0x14
mov eax, dword [0x54000c]
test eax, eax
je 0x40f41a
push 0
call eax
push 0x100
push dword [0x540000]
call ebx
cmp edi, 2
je 0x40f423
test edi, edi
jne 0x40f48b
push 0x2c
push 0x4fd2cc
push 0x4fd2e0
push dword [0x534a10]
push 0
call fcn.0040de60
add esp, 0x14
cmp edi, 2
je 0x40f448
test edi, edi
jne 0x40f48b
push 0x4fd398
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp + 0xc], esi
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x1c
push eax
push dword [0x534a10]
push 0
call fcn.0040b8e0
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40f490
cmp edi, 1
jne 0x40f4f2
push 0x4fd398
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp + 0xc], esi
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x1d
push eax
push dword [0x534a0c]
push 0
call fcn.0040b8e0
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.004c8c7f
add esp, 0x18
cmp edi, 2
je 0x40f4d8
cmp edi, 1
jne 0x40f4f2
push 0x4fd3f0
push dword [0x534a0c]
push 0
call fcn.0041aaf0
add esp, 0xc
cmp edi, 2
je 0x40f4f6
test edi, edi
jne 0x40f510
push 0x4fd3f0
push dword [0x534a10]
push 0
call fcn.0041aaf0
add esp, 0xc
cmp edi, 2
je 0x40f515
cmp edi, 1
jne 0x40f52f
push 0x4fd41c
push dword [0x534a0c]
push 0
call fcn.0041aaf0
add esp, 0xc
cmp edi, 2
je 0x40f533
test edi, edi
jne 0x40f594
push 0x4fd41c
push dword [0x534a10]
push 0
call fcn.0041aaf0
add esp, 0xc
cmp edi, 2
je 0x40f551
test edi, edi
jne 0x40f594
push 0x4fd448
call fcn.004c8c20
mov esi, eax
push 0
mov dword [ebp + 0xc], esi
call fcn.004c8c7f
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0x1e
push eax
push dword [0x534a10]
push 0
invalid
popal