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
jmp 0x449388
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
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