Function at 0x408540
Capabilities:
Get number of processors
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x57f076
mov eax, dword fs:[0]
push eax
sub esp, 0x2a4
mov eax, dword [0x5e68f0]
xor eax, esp
mov dword [esp + 0x2a0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e68f0]
xor eax, esp
push eax
lea eax, [esp + 0x2b8]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2c8]
mov ebp, dword [esp + 0x2cc]
mov esi, ecx
mov edi, edx
push 0x5bfdf0
push eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], edi
call fcn.0050d7cf
mov ebx, eax
xor eax, eax
add esp, 8
mov dword [esp + 0x18], ebx
cmp ebx, eax
jne 0x408601
cmp esi, eax
je 0x4085fa
lea edi, [esp + 0x14]
call fcn.00409220
push eax
mov ecx, esi
mov dword [esp + 0x2c4], 0
call fcn.0040b710
mov dword [esp + 0x2c0], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4085fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x408813
cmp edi, eax
je 0x40860d
mov ecx, dword [edi]
mov dword [esp + 0x14], ecx
jmp 0x408611
mov dword [esp + 0x14], eax
xor edx, edx
mov ecx, ebp
mov word [esp + 0x30], dx
mov dword [esp + 0x32], eax
mov dword [esp + 0x36], eax
mov dword [esp + 0x3a], eax
mov dword [esp + 0x3e], eax
mov dword [esp + 0x42], eax
mov dword [esp + 0x46], eax
mov dword [esp + 0x4a], eax
mov dword [esp + 0x4e], eax
mov dword [esp + 0x52], eax
mov word [esp + 0x56], ax
call fcn.00408010
push 2
push 0
push ebx
call fcn.0050d870
push ebx
call fcn.0050da92
push 0
push 0
push ebx
mov edi, eax
call fcn.0050d870
add esp, 0x1c
xor esi, esi
test edi, edi
je 0x4087b1
push edi
call fcn.0040d4d7
mov ebx, eax
mov eax, dword [esp + 0x1c]
push eax
push 1
push edi
push ebx
call fcn.0050dda0
add esp, 0x14
cmp edi, 0x64
mov eax, edi
jle 0x408696
mov eax, 0x64
push eax
mov edx, ebx
lea ecx, [esp + 0x124]
call fcn.00408c00
xor ecx, ecx
mov word [esp + eax*2 + 0x124], cx
mov eax, esp
lea edx, [esp + 0x124]
mov dword [eax], edx
lea eax, [esp + 0x24]
mov dword [esp + 0x30], esp
push eax
mov dword [esp + 0x24], 0xfde9
call fcn.00408d90
add esp, 8
mov dword [esp + 0x2c0], 1
mov ecx, dword [esp + 0x20]
cmp dword [ecx - 0xc], 0
je 0x408703
push 5
mov eax, 0x5bfdf8
call fcn.004084c0
add esp, 4
test eax, eax
je 0x408703
mov dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x1c]
push 0
push 0
push edi
push ebx
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, esi
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add eax, ecx
mov ecx, dword [ebp]
sub ecx, 0x10
mov edx, 1
sub edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
sub ecx, eax
or ecx, edx
jge 0x40875d
push eax
mov ecx, ebp
call fcn.004018a0
mov eax, dword [ebp]
mov edx, dword [esp + 0x1c]
push esi
push eax
push edi
push ebx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
mov ecx, ebp
call fcn.0040b650
push ebx
call fcn.0040d4cc
mov dword [esp + 0x2c4], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4087ad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
push esi
push edi
lea ecx, [esp + 0x38]
push ecx
push str._s_d_bytes_to__d_wide_chars
lea edx, [esp + 0x68]
call fcn.0040b630
mov ecx, dword [esp + 0x34]
add esp, 0x10
test ecx, ecx
je 0x4087fa
lea eax, [esp + 0x58]
lea esi, [eax + 2]
jmp 0x4087e0
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4087e0
sub eax, esi
sar eax, 1
push eax
lea edx, [esp + 0x5c]
push edx
call fcn.00408080
push ebx
call fcn.0050de53
mov eax, dword [esp + 0x2c]
add esp, 4
test eax, eax
je 0x408811
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov al, 1
mov ecx, dword [esp + 0x2b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2a0]
xor ecx, esp
call fcn.0050c2f2
add esp, 0x2b0
ret