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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ax, word [edi + 0x18]
xor ebx, ebx
cmp ax, 2
lea esi, [edi + 0x20]
mov word [esi], bx
jbe 0x7c8332d4
mov ecx, dword [edi + 0x1c]
cmp word [ecx + 2], 0x3a
jne 0x7c8332d4
lea eax, [ebp - 8]
push eax
movzx eax, word [edi + 0x22]
push dword [edi + 0x24]
shr eax, 1
push eax
push dword [edi + 0x1c]
call sym.KERNEL32.dll_GetFullPathNameW
movzx ecx, word [edi + 0x22]
cmp eax, ecx
ja 0x7c83b6b5
add eax, eax
mov word [esi], ax
mov dword [ebp - 4], ebx
mov eax, dword [0x7c88575c]
cmp eax, ebx
jne 0x7c83b6c1
xor esi, esi
cmp dword [ebp - 4], ebx
jl 0x7c81d686
push ebx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [edi + 0x24]
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
test al, al
je 0x7c82eb5a
lea eax, [ebp - 0x2c]
push eax
lea eax, [edi + 0x20]
push eax
call dword [sym.imp.ntdll.dll_RtlCopyUnicodeString]
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
mov eax, dword fs:[0x18]
movzx ecx, word [edi + 0x22]
mov eax, dword [eax + 0x30]
add ecx, 0x78
push ecx
mov ecx, dword [0x7c8856d4]
add ecx, 0x80000
or ecx, 8
push ecx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
cmp esi, ebx
je 0x7c83b6da
lea eax, [esi + 0x78]
mov dword [esi + 0xc], eax
mov ax, word [edi + 0x22]
lea ecx, [edi + 0x20]
mov word [esi + 0xa], ax
lea eax, [esi + 8]
push ecx
push eax
call dword [sym.imp.ntdll.dll_RtlCopyUnicodeString]
mov eax, dword [edi + 8]
mov dword [esi + 0x10], eax
mov al, byte [edi + 4]
mov byte [esi + 0x18], al
mov eax, dword [0x7c885758]
cmp eax, ebx
jne 0x7c83b6e4
lea eax, [esi + 8]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], 0x18
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x38], 0x40
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
cmp byte [esi + 0x18], bl
lea eax, [ebp - 0x24]
jne 0x7c81e038
push 0x60
push 7
push eax
lea eax, [ebp - 0x44]
push eax
push 0x80100000
lea eax, [esi + 0x14]
push eax
call dword [sym.imp.ntdll.dll_NtOpenFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
jl 0x7c82eb17
mov byte [esi + 0x1a], bl
or dword [ebp - 0x1c], 0xffffffff
or dword [ebp - 0x18], 0xffffffff
xor eax, eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov al, byte [esi + 0x18]
push eax
push ebx
push dword [0x7c885604]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push ebx
push dword [esi + 0x14]
call dword [sym.imp.ntdll.dll_NtLockFile]
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x7c83b6ef
mov byte [esi + 0x1a], 1
cmp dword [ebp - 4], ebx
jl 0x7c82eb17
push 5
push 0x18
lea eax, [esi + 0x60]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [esi + 0x14]
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
cmp eax, 0x80000005
mov dword [ebp - 4], eax
je 0x7c83b702
cmp dword [ebp - 4], ebx
jl 0x7c82eb17
mov eax, dword [esi + 0x68]
xor ecx, ecx
cmp byte [esi + 0x19], bl
push 4
setne cl
mov dword [esi + 0x1c], eax
push 0x2000
lea edi, [esi + 0x20]
inc ecx
lea eax, [eax + ecx*4]
lea ecx, [esi + 0x28]
push ecx
push ebx
mov dword [esi + 0x24], eax
push edi
add eax, 0x100000
push 0xffffffffffffffff
mov dword [ecx], eax
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x7c82eb87
push 4
push 0x1000
lea eax, [esi + 0x24]
push eax
push ebx
push edi
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x7c82eb87
push 0x7c885604
push ebx
push dword [esi + 0x1c]
lea eax, [ebp - 0x24]
push dword [edi]
push eax
push ebx
push ebx
push ebx
push dword [esi + 0x14]
call dword [sym.imp.ntdll.dll_NtReadFile]
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x7c82eb87
mov eax, dword [esi + 0x1c]
cmp dword [ebp - 0x20], eax
jne 0x7c83b738
cmp dword [ebp - 4], ebx
jl 0x7c82eb87
or dword [ebp - 0xc], 0xffffffff
or dword [esi + 0x2c], 0xffffffff
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [edi]
mov dword [esi + 0x30], ebx
call dword [sym.imp.ntdll.dll_RtlIsTextUnicode]
mov ecx, dword [edi]
mov byte [esi + 0x19], al
cmp al, bl
mov eax, dword [esi + 0x1c]
jne 0x7c828fe3
add eax, ecx
cmp eax, ecx
jbe 0x7c81d66d
dec eax
mov dl, byte [eax]
cmp dl, 0x20
ja 0x7c81d66d
cmp dl, 0xd
je 0x7c81d66d
cmp dl, 0xa
jne 0x7c82eb77
mov eax, dword [esi + 0x1c]
add eax, ecx
cmp eax, ecx
jbe 0x7c81d680
cmp byte [eax - 1], 0xa
jne 0x7c83b75a
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 4
push ebx
push ebx
push 0x60
push 3
push 7
push 0x80
push ebx
push eax
lea eax, [ebp - 0x44]
push eax
push 0xc0100000
lea eax, [esi + 0x14]
push eax
call dword [sym.imp.ntdll.dll_NtCreateFile]
jmp 0x7c81d509
add eax, ecx
cmp eax, ecx
jbe 0x7c829005
add eax, 0xfffffffe
mov dx, word [eax]
cmp dx, 0x20
ja 0x7c829005
cmp dx, 0xd
je 0x7c829005
cmp dx, 0xa
jne 0x7c82eb66
mov eax, dword [esi + 0x1c]
add eax, ecx
cmp eax, ecx
jbe 0x7c81d680
cmp word [eax - 2], 0xa
je 0x7c81d680
jmp 0x7c83b744
cmp esi, ebx
je 0x7c81d686
cmp byte [esi + 0x1a], bl
jne 0x7c83b70a
push dword [esi + 0x14]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push esi
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x7c81d686
mov dword [ebp - 4], 0xc000003a
jmp 0x7c81d50c
add dword [esi + 0x1c], 0xfffffffe
cmp eax, dword [edi]
jbe 0x7c829005
jmp 0x7c828fe9
dec dword [esi + 0x1c]
cmp eax, dword [edi]
jbe 0x7c81d66d
jmp 0x7c81d657
cmp byte [esi + 0x1a], bl
jne 0x7c83b775
jmp 0x7c83b79e
out 0x9d, eax
sub byte [0x95ecc48c], 0x6d
pushal
add al, 0x94
js 0x7c83b686
adc al, 0x8d
int 0xbc
jbe 0x7c83b657
jns 0x7c83b70f
dec ebp
out 0x55, al
ja 0x7c83b6e0
fild qword [eax + 0x28]
das
sub byte [edi], ch
mov ebp, 0x6a993230
wait
xlatb
loopne 0x7c83b744
retf
inc ebp
out dx, eax
fmul qword [esi]
jp 0x7c83b7a7
js 0x7c83b76c
cmpsb byte [esi], byte es:[edi]
lcall 0xc317, 0xf53c614b
pop eax
xchg esp, eax
popal
mov eax, 0x6a39756
xchg edi, eax
out dx, eax
pop edx
jge 0x7c83b784
cld
pop ebx
outsd dx, dword [esi]
ret
pop eax
pop edx
pop edx
jae 0x7c83b7bc
xor ecx, dword [edx - 0x16]
sub ebx, dword [ebp + 0xf]
sub bh, ah
xor bl, byte [edi + 0x6e]
ret
std
pop edx
adc al, 0xa2
push 0xbfeda7d2
retf 0x62fb
xchg bh, cl
mov ecx, 0xd6059892
xor esi, edx
or esp, esi
hlt
push ebp
shl dword [edx*4 - 0x7a020dd7], 0xbb
mov eax, dword [0x8be6c7d]
salc
fmul dword [eax + 0x30]
mov ebp, 0xd71e7546
dec esi
and al, 0xb2
stosd dword es:[edi], eax
leave
push cs
movsd dword es:[edi], dword [esi]
mov dh, 0xb9
xor eax, edi
sal byte ds:[ecx - 0x637740ab], 1
sub cl, dl
test dl, 0xd5
invalid