Function at 0x4045a0
Capabilities:
Check os version
Listen for remote procedure calls
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4288d6
mov eax, dword fs:[0]
push eax
sub esp, 0x3a0
mov eax, dword [0x434098]
xor eax, esp
mov dword [esp + 0x398], eax
push ebx
push esi
push edi
mov eax, dword [0x434098]
xor eax, esp
push eax
lea eax, [esp + 0x3b0]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x18], esi
cmp edi, 2
jl 0x404683
push str.DefaultPort
push dword [esi + 4]
call fcn.004103db
add esp, 8
test eax, eax
je 0x404683
push ecx
push str.__0_9___
lea ecx, [esp + 0x24]
call fcn.00405d60
mov dword [esp + 0x3b8], 0
push ecx
mov ecx, dword [esi + 4]
mov edx, eax
call fcn.00409250
add esp, 4
lea ecx, [esp + 0x1c]
mov bl, al
mov dword [esp + 0x3b8], 0xffffffff
call fcn.00405e00
push dword [esi + 4]
test bl, bl
je 0x4049a9
call fcn.0041157d
add esp, 4
test eax, eax
js 0x404991
push dword [esi + 4]
call fcn.0041157d
add esp, 4
cmp eax, 0xffff
jg 0x404991
mov ecx, dword [esi + 4]
call fcn.00405430
mov dword [0x43baec], eax
cmp edi, 3
jl 0x404ee9
push str.DefaultKMSPID
push dword [esi + 8]
call fcn.004103db
add esp, 8
test eax, eax
je 0x404ee9
push str.RandomKMSPID
push dword [esi + 8]
call fcn.004103db
add esp, 8
test eax, eax
jne 0x404fa2
push eax
call fcn.00411a9c
add esp, 4
push eax
call fcn.00411922
add esp, 4
lea ecx, [esp + 0x124]
push str.55041_00168_305_XXXXXX_03_1033_VVVV.0000_DDDYYYY
call fcn.00405530
sub esp, 8
lea ecx, [esp + 0x34]
mov dword [esp + 0x3c0], 1
call fcn.00405e50
mov esi, 6
mov byte [esp + 0x3b8], 2
lea edi, [esi + 4]
call fcn.004118ff
xor edx, edx
div edi
lea ecx, [esp + 0x3c]
mov dl, byte [edx + str.0123456789]
call fcn.00409310
dec esi
jne 0x404706
lea eax, [esp + 0x154]
push eax
lea ecx, [esp + 0x30]
call fcn.00405f80
mov byte [esp + 0x3b8], 3
push esi
push 0x42fb7a
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], esi
mov byte [esp + 0xe4], 0
call fcn.00408010
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x3bc], 4
call fcn.004072f0
mov byte [esp + 0x3b8], 3
cmp dword [esp + 0xf0], 0x10
jb 0x4047a0
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
call fcn.004118ff
mov edi, eax
and edi, 0x80000003
jns 0x4047b4
dec edi
or edi, 0xfffffffc
inc edi
push 0
lea eax, [esp + 0x20]
push 4
push eax
add edi, 0x7d9
call fcn.00421b4a
mov ecx, dword [esp + 0x48]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
lea ecx, [esp + ecx + 0x44]
push ecx
call eax
mov eax, dword [esp + 0x48]
add esp, 0xc
mov eax, dword [eax + 4]
push edi
lea ecx, [esp + 0x40]
mov byte [esp + eax + 0x80], 0x30
call fcn.00405760
lea eax, [esp + 0x16c]
push eax
lea ecx, [esp + 0x30]
call fcn.00405f80
mov byte [esp + 0x3b8], 5
push 0
push 0x42fb7b
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00408010
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x3bc], 6
call fcn.004072f0
cmp dword [esp + 0xf0], 0x10
jb 0x404879
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
mov dword [esp + 0x150], 0xf
mov dword [esp + 0x14c], 0
mov byte [esp + 0x13c], 0
mov eax, edi
mov byte [esp + 0x3b8], 7
and eax, 0x80000003
jns 0x4048ad
dec eax
or eax, 0xfffffffc
inc eax
jne 0x4049be
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov esi, edx
shr esi, 0x1f
add esi, edx
imul esi, esi, 0x64
mov ecx, edi
sub ecx, esi
jne 0x4048ec
mov eax, 0x51eb851f
imul edi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x190
sub edi, eax
jne 0x4049be
push 0
lea eax, [esp + 0x20]
push 3
push eax
call fcn.00421b4a
mov ecx, dword [esp + 0x48]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
lea edx, [esp + 0x44]
add ecx, edx
push ecx
call eax
mov eax, dword [esp + 0x48]
add esp, 0xc
mov eax, dword [eax + 4]
mov byte [esp + eax + 0x7c], 0x30
call fcn.004118ff
cdq
mov ecx, 0x16e
idiv ecx
lea ecx, [esp + 0x3c]
inc edx
push edx
call fcn.00405760
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x30]
call fcn.00405f80
push eax
lea ecx, [esp + 0x140]
call fcn.00405600
cmp dword [esp + 0xf0], 0x10
jb 0x404973
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
push 0x42fc09
lea ecx, [esp + 0xe0]
call fcn.00405530
mov byte [esp + 0x3b8], 8
jmp 0x404a7e
push dword [esi + 4]
push str.Invalid_Port_Range___s_is_not_a_valid_argument._n
call fcn.0041184e
add esp, 8
or eax, 0xffffffff
jmp 0x40537b
push str.Invalid_Port___s_is_not_a_valid_argument._n
call fcn.0041184e
add esp, 8
or eax, 0xffffffff
jmp 0x40537b
push 0
lea eax, [esp + 0x20]
push 3
push eax
call fcn.00421b4a
mov ecx, dword [esp + 0x48]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
lea edx, [esp + 0x44]
add ecx, edx
push ecx
call eax
mov eax, dword [esp + 0x48]
add esp, 0xc
mov eax, dword [eax + 4]
mov byte [esp + eax + 0x7c], 0x30
call fcn.004118ff
cdq
mov ecx, 0x16d
idiv ecx
lea ecx, [esp + 0x3c]
inc edx
push edx
call fcn.00405760
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x30]
call fcn.00405f80
push eax
lea ecx, [esp + 0x140]
call fcn.00405600
cmp dword [esp + 0xf0], 0x10
jb 0x404a45
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
push 0
push 0x42fc0a
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00408010
mov byte [esp + 0x3b8], 9
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x48]
call fcn.004072f0
cmp dword [esp + 0xf0], 0x10
jb 0x404aa8
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
mov dword [esp + 0x120], 0xf
mov dword [esp + 0x11c], 0
mov byte [esp + 0x10c], 0
mov byte [esp + 0x3b8], 0xa
call fcn.004118ff
mov esi, eax
and esi, 0x80000003
jns 0x404ae2
dec esi
or esi, 0xfffffffc
inc esi
call fcn.004118ff
cdq
mov ecx, 3
idiv ecx
cmp esi, ecx
ja case.default.0x404af3
jmp dword [esi*4 + 0x4053a0]
push str.3790
jmp 0x404b44
test edx, edx
jne 0x404b0c
push str.6000
jmp 0x404b44
lea ecx, [esp + 0x10c]
cmp edx, 1
jne 0x404b1f
push str.6001
jmp 0x404b4b
push str.6002
jmp 0x404b4b
lea ecx, [esp + 0x10c]
test edx, edx
jne 0x404b38
push str.7600
jmp 0x404b4b
push str.7601
jmp 0x404b4b
push str.9200
lea ecx, [esp + 0x110]
call fcn.004056b0
push 6
push str.XXXXXX
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00408010
lea eax, [esp + 0x154]
push eax
lea edx, [esp + 0xe0]
lea ecx, [esp + 0x128]
mov byte [esp + 0x3bc], 0xb
call fcn.004053d0
add esp, 4
mov byte [esp + 0x3b8], 0xa
cmp dword [esp + 0xf0], 0x10
jb 0x404bc8
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
push 4
push str.VVVV
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00408010
lea eax, [esp + 0x10c]
push eax
lea edx, [esp + 0xe0]
lea ecx, [esp + 0x128]
mov byte [esp + 0x3bc], 0xc
call fcn.004053d0
add esp, 4
mov byte [esp + 0x3b8], 0xa
cmp dword [esp + 0xf0], 0x10
jb 0x404c40
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
push 3
push 0x42ff74
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00408010
lea eax, [esp + 0x13c]
push eax
lea edx, [esp + 0xe0]
lea ecx, [esp + 0x128]
mov byte [esp + 0x3bc], 0xd
call fcn.004053d0
add esp, 4
mov byte [esp + 0x3b8], 0xa
cmp dword [esp + 0xf0], 0x10
jb 0x404cb8
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
push 4
push str.YYYY
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00408010
lea eax, [esp + 0x16c]
push eax
lea edx, [esp + 0xe0]
lea ecx, [esp + 0x128]
mov byte [esp + 0x3bc], 0xe
call fcn.004053d0
add esp, 4
mov byte [esp + 0x3b8], 0xa
cmp dword [esp + 0xf0], 0x10
jb 0x404d30
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
cmp dword [esp + 0x138], 0x10
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x130]
cmovae eax, dword [esp + 0x130]
push eax
push 0
push 0xfde9
mov dword [esp + 0x2c], eax
call ebx
xor ecx, ecx
mov edi, eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00410c84
add esp, 4
mov esi, eax
push edi
push esi
push 0xffffffffffffffff
push dword [esp + 0x20]
push 0
push 0xfde9
call ebx
cmp dword [esp + 0x120], 0x10
mov dword [str.55041_00168_305_246209_03_1033_7600.0000_0522010], esi
jb 0x404dae
push dword [esp + 0x10c]
call fcn.0041027b
add esp, 4
cmp dword [esp + 0x150], 0x10
mov dword [esp + 0x120], 0xf
mov dword [esp + 0x11c], 0
mov byte [esp + 0x10c], 0
jb 0x404de5
push dword [esp + 0x13c]
call fcn.0041027b
add esp, 4
cmp dword [esp + 0x180], 0x10
mov dword [esp + 0x150], 0xf
mov dword [esp + 0x14c], 0
mov byte [esp + 0x13c], 0
jb 0x404e1c
push dword [esp + 0x16c]
call fcn.0041027b
add esp, 4
cmp dword [esp + 0x168], 0x10
mov dword [esp + 0x180], 0xf
mov dword [esp + 0x17c], 0
mov byte [esp + 0x16c], 0
jb 0x404e53
push dword [esp + 0x154]
call fcn.0041027b
add esp, 4
lea ecx, [esp + 0x94]
mov dword [esp + 0x168], 0xf
mov dword [esp + 0x164], 0
mov byte [esp + 0x154], 0
mov byte [esp + 0x3b8], 1
call fcn.00405f00
lea eax, [esp + 0x94]
push eax
mov dword [esp + 0x98], vtable.std::ios_base.0
call fcn.00421dd3
add esp, 4
mov dword [esp + 0x3b8], 0xffffffff
cmp dword [esp + 0x138], 0x10
jb 0x404ec4
push dword [esp + 0x124]
call fcn.0041027b
add esp, 4
mov esi, dword [esp + 0x18]
mov edi, dword [ebp + 8]
mov dword [esp + 0x138], 0xf
mov dword [esp + 0x134], 0
mov byte [esp + 0x124], 0
cmp edi, 4
jl 0x404f15
push str.KillProcessOnPort
push dword [esi + 0xc]
call fcn.004103db
movzx ecx, byte [0x43d17e]
add esp, 8
mov edx, 1
test eax, eax
cmove ecx, edx
mov byte [0x43d17e], cl
push 0
push dword [0x43baec]
push 0xa
push 0x430028
call dword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpW]
mov esi, eax
test esi, esi
je 0x4052f9
cmp esi, 0x6cc
jne 0x405333
cmp byte [0x43d17e], 1
jne 0x405333
lea eax, [esp + 0x184]
push eax
mov dword [esp + 0x188], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov dword [esp + 0xf0], 0xf
mov dword [esp + 0xec], 0
mov byte [esp + 0xdc], 0
mov dword [esp + 0x3b8], 0x10
mov eax, dword [esp + 0x188]
cmp eax, 5
jne 0x40500e
push str.FOR__F__tokens4_delims____P_IN__netstat__ano__findstr_:1688___DO_echo__P
jmp 0x405018
push ecx
push str.__0_9_5____0_9_5____0_9_3____0_9_6____0_9_2____0_9_4____0_9_4_.__0_9_4____0_9_7__
lea ecx, [esp + 0x24]
call fcn.00405d60
mov dword [esp + 0x3b8], 0xf
push ecx
mov ecx, dword [esi + 8]
mov edx, eax
call fcn.00409250
add esp, 4
lea ecx, [esp + 0x1c]
mov bl, al
mov dword [esp + 0x3b8], 0xffffffff
call fcn.00405e00
test bl, bl
je 0x404ff6
mov ecx, dword [esi + 8]
call fcn.00405430
mov dword [str.55041_00168_305_246209_03_1033_7600.0000_0522010], eax
jmp 0x404ee9
push dword [esi + 8]
push str.Invalid_PID___s_is_not_a_valid_argument._n
call fcn.0041184e
add esp, 8
or eax, 0xffffffff
jmp 0x40537b
cmp eax, 6
jb 0x405024
push str.FOR__F__tokens5_delims____P_IN__netstat__ano__findstr_:1688___DO_echo__P
lea ecx, [esp + 0xe0]
call fcn.004056b0
push 4
push 0
push str.1688
lea ecx, [esp + 0xe8]
call fcn.00406df0
mov edi, eax
call fcn.00405490
mov edx, eax
cmp byte [edx], 0
jne 0x40504b
xor ecx, ecx
jmp 0x405059
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405050
sub ecx, esi
push ecx
push edx
push 5
push edi
lea ecx, [esp + 0xec]
call fcn.00406c00
cmp dword [esp + 0xf0], 0x10
lea eax, [esp + 0xdc]
cmovae eax, dword [esp + 0xdc]
push 0x430044
push eax
call fcn.00410d94
mov edi, eax
push edi
lea eax, [esp + 0x2a8]
push 0x104
push eax
call fcn.004116fa
add esp, 0x14
test eax, eax
je 0x4052b7
mov ebx, dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp byte [esp + 0x29c], 0
mov dword [esp + 0x108], 0xf
mov dword [esp + 0x104], 0
mov byte [esp + 0xf4], 0
jne 0x4050de
xor ecx, ecx
jmp 0x4050f1
lea ecx, [esp + 0x29c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4050e8
sub ecx, edx
push ecx
lea eax, [esp + 0x2a0]
push eax
lea ecx, [esp + 0xfc]
call fcn.00408010
sub esp, 8
lea eax, [esp + 0x18]
mov byte [esp + 0x3c0], 0x11
push eax
lea ecx, [esp + 0x100]
mov byte [esp + 0x1c], 0x20
call fcn.00406f60
inc eax
cmp dword [esp + 0x104], eax
jb 0x405329
cmp dword [esp + 0x108], 0x10
lea ecx, [esp + 0xf4]
cmovae ecx, dword [esp + 0xf4]
mov dword [esp + 0x104], eax
mov byte [eax + ecx], 0
sub esp, 8
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x100]
mov byte [esp + 0x1c], 0x20
call fcn.00406ef0
push ecx
inc eax
push eax
lea eax, [esp + 0x15c]
push eax
lea ecx, [esp + 0x100]
call fcn.004056f0
mov esi, eax
lea eax, [esp + 0xf4]
cmp eax, esi
je 0x405223
cmp dword [esp + 0x108], 0x10
jb 0x4051b1
push dword [esp + 0xf4]
call fcn.0041027b
add esp, 4
mov dword [esp + 0x108], 0xf
mov dword [esp + 0x104], 0
mov byte [esp + 0xf4], 0
cmp dword [esi + 0x14], 0x10
jae 0x4051ef
mov eax, dword [esi + 0x10]
inc eax
je 0x4051fe
push eax
lea eax, [esp + 0xf8]
push esi
push eax
call fcn.00410640
add esp, 0xc
jmp 0x4051fe
mov eax, dword [esi]
mov dword [esp + 0xf4], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [esp + 0x104], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x108], eax
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
cmp dword [esp + 0x168], 0x10
jb 0x40523c
push dword [esp + 0x154]
call fcn.0041027b
add esp, 4
cmp dword [esp + 0x108], 0x10
lea eax, [esp + 0xf4]
cmovae eax, dword [esp + 0xf4]
push eax
call fcn.0041157d
add esp, 4
push eax
push 0
push 0x1fffff
call ebx
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x3b8], 0x10
cmp dword [esp + 0x108], 0x10
jb 0x405299
push dword [esp + 0xf4]
call fcn.0041027b
add esp, 4
push edi
lea eax, [esp + 0x2a0]
push 0x104
push eax
call fcn.004116fa
add esp, 0xc
test eax, eax
jne 0x4050b2
push edi
call fcn.00410cc5
add esp, 4
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push dword [0x43baec]
push 0xa
push str.ncacn_ip_tcp
call dword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpW]
cmp dword [esp + 0xf0], 0x10
jb 0x4052f9
push dword [esp + 0xdc]
call fcn.0041027b
add esp, 4
push 0
push 0x4d2
push 0x11
push 0
push 0
push 0x42fb88
call dword [sym.imp.RPCRT4.dll_RpcServerRegisterIfEx]
mov esi, eax
test esi, esi
je 0x405345
push esi
push str.RpcServerRegisterIfEx_failed_with_code__i._n
call fcn.0041184e
add esp, 8
mov eax, esi
jmp 0x40537b
push str.invalid_string_position
call fcn.00421d60
push esi
push str.RpcServerUseProtseqEp_failed_with_code__i._n
call fcn.0041184e
add esp, 8
mov eax, esi
jmp 0x40537b
push str.KMS_Server_Emulator_running..._n
call fcn.0041184e
add esp, 4
push 0
push 0x4d2
push 1
call dword [sym.imp.RPCRT4.dll_RpcServerListen]
mov esi, eax
test esi, esi
je 0x405379
push esi
push str.RpcServerListen_failed_with_code__i._n
call fcn.0041184e
add esp, 8
mov eax, esi
jmp 0x40537b
xor eax, eax
mov ecx, dword [esp + 0x3b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x398]
xor ecx, esp
call fcn.0041026c
mov esp, ebp
pop ebp
ret