Function at 0x404c90
Capabilities:
Access peb ldr_data
Check if file exists
Get number of processors
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41cdc0
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push ebp
push esi
push edi
mov eax, dword [0x423044]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [0x424614]
mov edx, dword [eax + 0xc]
xor ebx, ebx
mov ecx, 0x424614
mov dword [esp + 0x20], ebx
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x80], ebx
mov eax, dword [0x424614]
mov edx, dword [eax + 0xc]
mov ecx, 0x424614
call edx
add eax, 0x10
mov dword [esp + 0x28], eax
mov byte [esp + 0x80], 1
mov eax, dword [0x424614]
mov edx, dword [eax + 0xc]
mov ecx, 0x424614
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x80], 2
mov eax, dword [0x424614]
mov edx, dword [eax + 0xc]
mov ecx, 0x424614
call edx
add eax, 0x10
mov dword [esp + 0x24], eax
mov eax, vtable.._AV__KSmart_PAXVKCloseHandleFunc___0_0__.0
or ebp, 0xffffffff
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebx
mov byte [esp + 0x80], 5
xor eax, eax
cmp dword [esp + 0x88], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
je 0x405059
cmp dword [esp + 0x8c], ebx
je 0x405059
push esi
call fcn.00405120
cmp eax, ebx
je 0x405059
mov ecx, esi
call fcn.004053e0
cmp eax, ebx
je 0x405059
lea eax, [esp + 0x2c]
push str.ver.dat
lea ecx, [esi + 0x1c]
push eax
call fcn.00408720
add esp, 8
lea ebx, [esp + 0x1c]
mov byte [esp + 0x80], 6
call fcn.004085e0
lea eax, [esp + 0x2c]
mov byte [esp + 0x80], 5
call fcn.004085c0
lea ecx, [esp + 0x2c]
push str.ver.dat
lea edi, [esi + 0x10]
push ecx
mov ecx, edi
call fcn.00408720
add esp, 8
lea ebx, [esp + 0x18]
mov byte [esp + 0x80], 7
call fcn.004085e0
lea eax, [esp + 0x2c]
mov byte [esp + 0x80], 5
call fcn.004085c0
lea edx, [esp + 0x2c]
push str.ver.dat
lea ecx, [esi + 0x14]
push edx
call fcn.00408720
add esp, 8
lea ebx, [esp + 0x24]
mov byte [esp + 0x80], 8
call fcn.004085e0
lea eax, [esp + 0x2c]
mov byte [esp + 0x80], 5
call fcn.004085c0
lea eax, [esp + 0x2c]
push str.KPPMain.exe
push eax
mov ecx, edi
call fcn.00408720
add esp, 8
lea ebx, [esp + 0x28]
mov byte [esp + 0x80], 9
call fcn.004085e0
lea eax, [esp + 0x2c]
mov byte [esp + 0x80], 5
call fcn.004085c0
mov ecx, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 1
push connect
push ecx
call edi
lea ebx, [esp + 0x2c]
lea esi, [esp + 0x30]
mov dword [esp + 0x2c], eax
call fcn.00408a80
mov esi, dword [esp + 0x34]
cmp esi, ebp
je 0x405057
push 0
lea edx, [esp + 0x18]
push edx
push 0x14
lea eax, [esp + 0x5c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405039
cmp dword [esp + 0x14], 0x14
jne 0x405039
lea esi, [esp + 0x30]
call fcn.00408a30
mov ecx, dword [esp + 0x88]
mov dword [ecx], 0xfffffffe
xor ecx, ecx
lea esi, [esp + 0x18]
call fcn.00408800
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x404fbf
mov edx, dword [esp + 0x18]
push 0
push 0x80
push 3
push 0
push 1
push connect
push edx
call edi
lea ebx, [esp + 0x2c]
lea esi, [esp + 0x40]
mov dword [esp + 0x2c], eax
call fcn.00408a80
mov ebp, dword [esp + 0x44]
cmp ebp, 0xffffffff
je 0x404fbf
push 0
lea eax, [esp + 0x18]
push eax
push 0x14
lea ecx, [esp + 0x70]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404fbf
cmp dword [esp + 0x14], 0x14
jne 0x404fbf
mov edx, dword [esp + 0x70]
cmp edx, dword [esp + 0x5c]
jb 0x404f9b
lea ebx, [esp + 0x50]
lea edi, [esp + 0x64]
call fcn.00404c00
cmp eax, 1
jne 0x404faa
mov eax, dword [esp + 0x88]
mov dword [eax], 1
jmp 0x404fda
mov edx, dword [esp + 0x88]
xor ecx, ecx
test eax, eax
setne cl
add ecx, 3
mov dword [edx], ecx
jmp 0x404fe7
mov ecx, dword [esp + 0x88]
mov eax, dword [ecx]
cmp eax, 0xfffffffe
jne 0x404fd5
mov dword [ecx], 1
jmp 0x404fda
cmp eax, 1
jne 0x404fe7
push str.version_changed__update_needed_
call fcn.004023f0
add esp, 4
cmp dword [esp + 0x60], 0
je 0x404ffb
mov eax, dword [esp + 0x88]
mov dword [eax], 1
cmp ebp, 0xffffffff
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov dword [esp + 0x20], 1
je 0x405035
mov esi, dword [esp + 0x48]
add dword [esi], 0xffffffff
jne 0x405035
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0040ab1e
add esp, 4
mov esi, dword [esp + 0x34]
cmp esi, 0xffffffff
je 0x405057
mov edi, dword [esp + 0x38]
add dword [edi], 0xffffffff
jne 0x405057
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0040ab1e
add esp, 4
xor ebx, ebx
mov byte [esp + 0x80], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405081
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x80], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4050a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x80], bl
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4050d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x80], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4050fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 8