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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x427e46
mov eax, dword fs:[0]
push eax
sub esp, 0x3a0
mov eax, dword [0x4305c0]
xor eax, esp
mov dword [esp + 0x398], eax
push ebx
push esi
push edi
mov eax, dword [0x4305c0]
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 0x404cb3
push str.DefaultPort
push dword [esi + 4]
call fcn.004118fd
add esp, 8
test eax, eax
je 0x404cb3
push ecx
push str.__0_9___
lea ecx, [esp + 0x24]
call fcn.00406300
mov dword [esp + 0x3b8], 0
push ecx
mov ecx, dword [esi + 4]
mov edx, eax
call fcn.00409390
add esp, 4
lea ecx, [esp + 0x1c]
mov bl, al
mov dword [esp + 0x3b8], 0xffffffff
call fcn.004063a0
push dword [esi + 4]
test bl, bl
je 0x404fd9
call fcn.0041243d
add esp, 4
test eax, eax
js 0x404fc1
push dword [esi + 4]
call fcn.0041243d
add esp, 4
cmp eax, 0xffff
jg 0x404fc1
mov ecx, dword [esi + 4]
call fcn.00405a60
mov dword [0x437b74], eax
cmp edi, 3
jl 0x405519
push str.DefaultKMSPID
push dword [esi + 8]
call fcn.004118fd
add esp, 8
test eax, eax
je 0x405519
push str.RandomKMSPID
push dword [esi + 8]
call fcn.004118fd
add esp, 8
test eax, eax
jne 0x4055d2
push eax
call fcn.004127b1
add esp, 4
push eax
call fcn.004126ac
add esp, 4
lea ecx, [esp + 0x124]
push str.55041_00168_305_XXXXXX_03_1033_VVVV.0000_DDDYYYY
call fcn.004032f0
sub esp, 8
lea ecx, [esp + 0x34]
mov dword [esp + 0x3c0], 1
call fcn.004063f0
mov esi, 6
mov byte [esp + 0x3b8], 2
lea edi, [esi + 4]
call fcn.00412689
xor edx, edx
div edi
lea ecx, [esp + 0x3c]
mov dl, byte [edx + str.0123456789]
call fcn.00409450
dec esi
jne 0x404d36
lea eax, [esp + 0x154]
push eax
lea ecx, [esp + 0x30]
call fcn.00406520
mov byte [esp + 0x3b8], 3
push esi
push 0x42c91a
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], esi
mov byte [esp + 0xe4], 0
call fcn.00403390
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x3bc], 4
call fcn.00407880
mov byte [esp + 0x3b8], 3
cmp dword [esp + 0xf0], 0x10
jb 0x404dd0
push dword [esp + 0xdc]
call fcn.0041179d
add esp, 4
call fcn.00412689
mov edi, eax
and edi, 0x80000003
jns 0x404de4
dec edi
or edi, 0xfffffffc
inc edi
push 0
lea eax, [esp + 0x20]
push 4
push eax
add edi, 0x7d9
call fcn.004109ff
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.00405d00
lea eax, [esp + 0x16c]
push eax
lea ecx, [esp + 0x30]
call fcn.00406520
mov byte [esp + 0x3b8], 5
push 0
push 0x42c91b
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00403390
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x3bc], 6
call fcn.00407880
cmp dword [esp + 0xf0], 0x10
jb 0x404ea9
push dword [esp + 0xdc]
call fcn.0041179d
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 0x404edd
dec eax
or eax, 0xfffffffc
inc eax
jne 0x404fee
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 0x404f1c
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 0x404fee
push 0
lea eax, [esp + 0x20]
push 3
push eax
call fcn.004109ff
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.00412689
cdq
mov ecx, 0x16e
idiv ecx
lea ecx, [esp + 0x3c]
inc edx
push edx
call fcn.00405d00
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x30]
call fcn.00406520
push eax
lea ecx, [esp + 0x140]
call fcn.00405bd0
cmp dword [esp + 0xf0], 0x10
jb 0x404fa3
push dword [esp + 0xdc]
call fcn.0041179d
add esp, 4
push 0x42c9a9
lea ecx, [esp + 0xe0]
call fcn.004032f0
mov byte [esp + 0x3b8], 8
jmp 0x4050ae
push dword [esi + 4]
push str.Invalid_Port_Range___s_is_not_a_valid_argument._n
call fcn.004125dd
add esp, 8
or eax, 0xffffffff
jmp 0x4059ab
push str.Invalid_Port___s_is_not_a_valid_argument._n
call fcn.004125dd
add esp, 8
or eax, 0xffffffff
jmp 0x4059ab
push 0
lea eax, [esp + 0x20]
push 3
push eax
call fcn.004109ff
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.00412689
cdq
mov ecx, 0x16d
idiv ecx
lea ecx, [esp + 0x3c]
inc edx
push edx
call fcn.00405d00
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x30]
call fcn.00406520
push eax
lea ecx, [esp + 0x140]
call fcn.00405bd0
cmp dword [esp + 0xf0], 0x10
jb 0x405075
push dword [esp + 0xdc]
call fcn.0041179d
add esp, 4
push 0
push 0x42c9aa
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00403390
mov byte [esp + 0x3b8], 9
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x48]
call fcn.00407880
cmp dword [esp + 0xf0], 0x10
jb 0x4050d8
push dword [esp + 0xdc]
call fcn.0041179d
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.00412689
mov esi, eax
and esi, 0x80000003
jns 0x405112
dec esi
or esi, 0xfffffffc
inc esi
call fcn.00412689
cdq
mov ecx, 3
idiv ecx
cmp esi, ecx
ja case.default.0x405123
jmp dword [esi*4 + 0x4059d0]
push str.3790
jmp 0x405174
test edx, edx
jne 0x40513c
push str.6000
jmp 0x405174
lea ecx, [esp + 0x10c]
cmp edx, 1
jne 0x40514f
push str.6001
jmp 0x40517b
push str.6002
jmp 0x40517b
lea ecx, [esp + 0x10c]
test edx, edx
jne 0x405168
push str.7600
jmp 0x40517b
push str.7601
jmp 0x40517b
push str.9200
lea ecx, [esp + 0x110]
call fcn.00405c50
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.00403390
lea eax, [esp + 0x154]
push eax
lea edx, [esp + 0xe0]
lea ecx, [esp + 0x128]
mov byte [esp + 0x3bc], 0xb
call fcn.00405a00
add esp, 4
mov byte [esp + 0x3b8], 0xa
cmp dword [esp + 0xf0], 0x10
jb 0x4051f8
push dword [esp + 0xdc]
call fcn.0041179d
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.00403390
lea eax, [esp + 0x10c]
push eax
lea edx, [esp + 0xe0]
lea ecx, [esp + 0x128]
mov byte [esp + 0x3bc], 0xc
call fcn.00405a00
add esp, 4
mov byte [esp + 0x3b8], 0xa
cmp dword [esp + 0xf0], 0x10
jb 0x405270
push dword [esp + 0xdc]
call fcn.0041179d
add esp, 4
push 3
push 0x42cd14
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], 0xf
mov dword [esp + 0xf4], 0
mov byte [esp + 0xe4], 0
call fcn.00403390
lea eax, [esp + 0x13c]
push eax
lea edx, [esp + 0xe0]
lea ecx, [esp + 0x128]
mov byte [esp + 0x3bc], 0xd
call fcn.00405a00
add esp, 4
mov byte [esp + 0x3b8], 0xa
cmp dword [esp + 0xf0], 0x10
jb 0x4052e8
push dword [esp + 0xdc]
call fcn.0041179d
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.00403390
lea eax, [esp + 0x16c]
push eax
lea edx, [esp + 0xe0]
lea ecx, [esp + 0x128]
mov byte [esp + 0x3bc], 0xe
call fcn.00405a00
add esp, 4
mov byte [esp + 0x3b8], 0xa
cmp dword [esp + 0xf0], 0x10
jb 0x405360
push dword [esp + 0xdc]
call fcn.0041179d
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.00410681
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 0x4053de
push dword [esp + 0x10c]
call fcn.0041179d
add esp, 4
cmp dword [esp + 0x150], 0x10
mov dword [esp + 0x120], 0xf
mov dword [esp + 0x11c], 0
mov byte [esp + 0x10c], 0
jb 0x405415
push dword [esp + 0x13c]
call fcn.0041179d
add esp, 4
cmp dword [esp + 0x180], 0x10
mov dword [esp + 0x150], 0xf
mov dword [esp + 0x14c], 0
mov byte [esp + 0x13c], 0
jb 0x40544c
push dword [esp + 0x16c]
call fcn.0041179d
add esp, 4
cmp dword [esp + 0x168], 0x10
mov dword [esp + 0x180], 0xf
mov dword [esp + 0x17c], 0
mov byte [esp + 0x16c], 0
jb 0x405483
push dword [esp + 0x154]
call fcn.0041179d
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.004064a0
lea eax, [esp + 0x94]
push eax
mov dword [esp + 0x98], vtable.std::ios_base.0
call fcn.00410a52
add esp, 4
mov dword [esp + 0x3b8], 0xffffffff
cmp dword [esp + 0x138], 0x10
jb 0x4054f4
push dword [esp + 0x124]
call fcn.0041179d
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 0x405545
push str.KillProcessOnPort
push dword [esi + 0xc]
call fcn.004118fd
movzx ecx, byte [0x43923a]
add esp, 8
mov edx, 1
test eax, eax
cmove ecx, edx
mov byte [0x43923a], cl
push 0
push dword [0x437b74]
push 0xa
push 0x42cdc8
call dword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpW]
mov esi, eax
test esi, esi
je 0x405929
cmp esi, 0x6cc
jne 0x405963
cmp byte [0x43923a], 1
jne 0x405963
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 0x40563e
push str.FOR__F__tokens4_delims____P_IN__netstat__ano__findstr_:1688___DO_echo__P
jmp 0x405648
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.00406300
mov dword [esp + 0x3b8], 0xf
push ecx
mov ecx, dword [esi + 8]
mov edx, eax
call fcn.00409390
add esp, 4
lea ecx, [esp + 0x1c]
mov bl, al
mov dword [esp + 0x3b8], 0xffffffff
call fcn.004063a0
test bl, bl
je 0x405626
mov ecx, dword [esi + 8]
call fcn.00405a60
mov dword [str.55041_00168_305_246209_03_1033_7600.0000_0522010], eax
jmp 0x405519
push dword [esi + 8]
push str.Invalid_PID___s_is_not_a_valid_argument._n
call fcn.004125dd
add esp, 8
or eax, 0xffffffff
jmp 0x4059ab
cmp eax, 6
jb 0x405654
push str.FOR__F__tokens5_delims____P_IN__netstat__ano__findstr_:1688___DO_echo__P
lea ecx, [esp + 0xe0]
call fcn.00405c50
push 4
push 0
push str.1688
lea ecx, [esp + 0xe8]
call fcn.00407390
mov edi, eax
call fcn.00405ac0
mov edx, eax
cmp byte [edx], 0
jne 0x40567b
xor ecx, ecx
jmp 0x405689
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405680
sub ecx, esi
push ecx
push edx
push 5
push edi
lea ecx, [esp + 0xec]
call fcn.004071a0
cmp dword [esp + 0xf0], 0x10
lea eax, [esp + 0xdc]
cmovae eax, dword [esp + 0xdc]
push 0x42cde4
push eax
call fcn.00411c5e
mov edi, eax
push edi
lea eax, [esp + 0x2a8]
push 0x104
push eax
call fcn.00412480
add esp, 0x14
test eax, eax
je 0x4058e7
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 0x40570e
xor ecx, ecx
jmp 0x405721
lea ecx, [esp + 0x29c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405718
sub ecx, edx
push ecx
lea eax, [esp + 0x2a0]
push eax
lea ecx, [esp + 0xfc]
call fcn.00403390
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.00407500
inc eax
cmp dword [esp + 0x104], eax
jb 0x405959
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.00407490
push ecx
inc eax
push eax
lea eax, [esp + 0x15c]
push eax
lea ecx, [esp + 0x100]
call fcn.00405c90
mov esi, eax
lea eax, [esp + 0xf4]
cmp eax, esi
je 0x405853
cmp dword [esp + 0x108], 0x10
jb 0x4057e1
push dword [esp + 0xf4]
call fcn.0041179d
add esp, 4
mov dword [esp + 0x108], 0xf
mov dword [esp + 0x104], 0
mov byte [esp + 0xf4], 0
cmp dword [esi + 0x14], 0x10
jae 0x40581f
mov eax, dword [esi + 0x10]
inc eax
je 0x40582e
push eax
lea eax, [esp + 0xf8]
push esi
push eax
call fcn.00410ff0
add esp, 0xc
jmp 0x40582e
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 0x40586c
push dword [esp + 0x154]
call fcn.0041179d
add esp, 4
cmp dword [esp + 0x108], 0x10
lea eax, [esp + 0xf4]
cmovae eax, dword [esp + 0xf4]
push eax
call fcn.0041243d
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 0x4058c9
push dword [esp + 0xf4]
call fcn.0041179d
add esp, 4
push edi
lea eax, [esp + 0x2a0]
push 0x104
push eax
call fcn.00412480
add esp, 0xc
test eax, eax
jne 0x4056e2
push edi
call fcn.00411b8f
add esp, 4
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push dword [0x437b74]
push 0xa
push str.ncacn_ip_tcp
call dword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpW]
cmp dword [esp + 0xf0], 0x10
jb 0x405929
push dword [esp + 0xdc]
call fcn.0041179d
add esp, 4
push 0
push 0x4d2
push 0x11
push 0
push 0
push 0x42c928
call dword [sym.imp.RPCRT4.dll_RpcServerRegisterIfEx]
mov esi, eax
test esi, esi
je 0x405975
push esi
push str.RpcServerRegisterIfEx_failed_with_code__i._n
call fcn.004125dd
add esp, 8
mov eax, esi
jmp 0x4059ab
push str.invalid_string_position
call fcn.00410633
push esi
push str.RpcServerUseProtseqEp_failed_with_code__i._n
call fcn.004125dd
add esp, 8
mov eax, esi
jmp 0x4059ab
push str.KMS_Server_Emulator_running..._n
call fcn.004125dd
add esp, 4
push 0
push 0x4d2
push 1
call dword [sym.imp.RPCRT4.dll_RpcServerListen]
mov esi, eax
test esi, esi
je 0x4059a9
push esi
push str.RpcServerListen_failed_with_code__i._n
call fcn.004125dd
add esp, 8
mov eax, esi
jmp 0x4059ab
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.00410fdd
mov esp, ebp
pop ebp
ret