Function at 0x406630
Capabilities:
Check os version
Get file size
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c4cd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1f8
mov eax, dword [0x428014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
lea ecx, [ebp - 0x74]
mov dword [ebp - 4], 0
call fcn.00402f90
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 1
call fcn.00409bf0
xorps xmm0, xmm0
mov dword [ebp - 0x34], 0
movq qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x34], 0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x74]
cmp dword [ebp - 0x60], 8
mov dword [ebp - 0x38], 0
cmovae eax, dword [ebp - 0x74]
xor ecx, ecx
push ecx
push 0x80
push 4
push ecx
push 7
push 1
push eax
mov dword [ebp - 0x80], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4067b8
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
push edi
movlpd qword [ebp - 0x20], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x406799
cmp dword [ebp - 0x1c], 0
jg 0x406799
mov ecx, dword [ebp - 0x20]
jl 0x406728
cmp ecx, 0x8000000
ja 0x406799
mov esi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
sub esi, edx
cmp ecx, esi
jae 0x40673c
lea eax, [ecx + edx]
mov dword [ebp - 0x38], eax
jmp 0x406770
jbe 0x406770
mov eax, dword [ebp - 0x34]
sub eax, edx
cmp ecx, eax
jbe 0x406753
push ecx
push ecx
lea ecx, [ebp - 0x3c]
call fcn.0040aa20
jmp 0x40676a
mov eax, dword [ebp - 0x38]
sub ecx, esi
push ecx
push 0
push eax
lea esi, [eax + ecx]
call fcn.0040cde0
add esp, 0xc
mov dword [ebp - 0x38], esi
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x3c]
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406799
mov eax, dword [ebp - 0x18]
xor ecx, ecx
cmp eax, dword [ebp - 0x20]
jne 0x406799
cmp ecx, dword [ebp - 0x1c]
je 0x4067ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push edi
mov dword [ebp - 0x80], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4067c3
push edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4067c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x80], esi
mov edx, dword [ebp - 0x38]
test esi, esi
mov edi, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0xb8]
cmovne edx, edi
mov eax, dword [ebp - 0xb4]
add eax, ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x38], edx
sub eax, ecx
sub edx, edi
mov dword [ebp - 0x1c], edi
cmp edx, eax
je 0x4067f3
mov byte [ebp - 0x75], 0
jmp 0x40684d
mov esi, edi
sub edx, 4
jb 0x406811
nop word [eax + eax]
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x406816
add esi, 4
add ecx, 4
sub edx, 4
jae 0x406800
cmp edx, 0xfffffffc
je 0x406849
mov al, byte [esi]
cmp al, byte [ecx]
jne 0x406843
cmp edx, 0xfffffffd
je 0x406849
mov al, byte [esi + 1]
cmp al, byte [ecx + 1]
jne 0x406843
cmp edx, 0xfffffffe
je 0x406849
mov al, byte [esi + 2]
cmp al, byte [ecx + 2]
jne 0x406843
cmp edx, 0xffffffff
je 0x406849
mov al, byte [esi + 3]
cmp al, byte [ecx + 3]
je 0x406849
mov byte [ebp - 0x75], 0
jmp 0x40684d
mov byte [ebp - 0x75], 1
mov byte [ebp - 4], 1
test edi, edi
je 0x406884
mov ecx, dword [ebp - 0x34]
mov edx, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x40687a
mov edx, dword [edi - 4]
mov eax, edi
sub eax, edx
add ecx, 0x23
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406c67
push ecx
push edx
call fcn.0040b069
add esp, 8
push 0x41
call dword [sym.imp.USER32.dll_CharLowerW]
xorps xmm0, xmm0
movzx edi, ax
movups xmmword [ebp - 0xa0], xmm0
xor esi, esi
mov word [ebp - 0x88], 0
movq qword [ebp - 0x90], xmm0
nop dword [eax]
mov ecx, edi
test esi, esi
je 0x4068ca
lea edx, [esi - 1]
call fcn.004029d0
imul ecx, eax, 0x19660d
add ecx, 0x3c6ef35f
mov ax, word [esi*2 + 0x4251dc]
xor ax, cx
mov word [ebp + esi*2 - 0xa0], ax
inc esi
cmp esi, 0xd
jb 0x4068b0
movups xmm0, xmmword [ebp - 0xa0]
mov ax, word [ebp - 0x88]
lea ecx, [ebp - 0x48]
mov word [ebp - 0x30], ax
movups xmmword [ebp - 0x48], xmm0
movq xmm0, qword [ebp - 0x90]
movq qword [ebp - 0x38], xmm0
call fcn.00403670
push 0x41
mov byte [ebp - 0x77], al
call dword [sym.imp.USER32.dll_CharLowerW]
xorps xmm0, xmm0
movzx edi, ax
movups xmmword [ebp - 0xa0], xmm0
xor esi, esi
mov word [ebp - 0x88], 0
movq qword [ebp - 0x90], xmm0
nop dword [eax]
mov ecx, edi
test esi, esi
je 0x40695a
lea edx, [esi - 1]
call fcn.004029d0
imul ecx, eax, 0x19660d
add ecx, 0x3c6ef35f
mov ax, word [esi*2 + 0x4251c0]
xor ax, cx
mov word [ebp + esi*2 - 0xa0], ax
inc esi
cmp esi, 0xd
jb 0x406940
movups xmm0, xmmword [ebp - 0xa0]
movzx eax, word [ebp - 0x88]
lea ecx, [ebp - 0x48]
mov word [ebp - 0x30], ax
movups xmmword [ebp - 0x48], xmm0
movq xmm0, qword [ebp - 0x90]
movq qword [ebp - 0x38], xmm0
call fcn.00403670
mov esi, dword [sym.imp.USER32.dll_CharLowerW]
push 0x41
mov byte [ebp - 0x79], al
call esi
movzx edx, ax
mov ecx, 0x425198
lea eax, [ebp - 0x58]
push eax
call fcn.00404f60
add esp, 4
movups xmm0, xmmword [eax]
mov ecx, dword [eax + 0x20]
mov dword [ebp - 0x8c], ecx
lea ecx, [ebp - 0xac]
movups xmmword [ebp - 0xac], xmm0
movups xmm0, xmmword [eax + 0x10]
movzx eax, word [eax + 0x24]
mov word [ebp - 0x88], ax
movups xmmword [ebp - 0x9c], xmm0
call fcn.00403670
push 0x41
mov byte [ebp - 0x7a], al
call esi
xorps xmm0, xmm0
movzx edi, ax
movups xmmword [ebp - 0x48], xmm0
xor esi, esi
movq qword [ebp - 0x38], xmm0
nop dword [eax + eax]
mov ecx, edi
test esi, esi
je 0x406a2a
lea edx, [esi - 1]
call fcn.004029d0
imul ecx, eax, 0x19660d
add ecx, 0x3c6ef35f
mov ax, word [esi*2 + 0x425180]
xor ax, cx
mov word [ebp + esi*2 - 0x48], ax
inc esi
cmp esi, 0xc
jb 0x406a10
movups xmm0, xmmword [ebp - 0x48]
lea ecx, [ebp - 0xa0]
movups xmmword [ebp - 0xa0], xmm0
movq xmm0, qword [ebp - 0x38]
movq qword [ebp - 0x90], xmm0
call fcn.00403670
mov esi, dword [sym.imp.USER32.dll_CharLowerW]
push 0x41
mov byte [ebp - 0x78], al
call esi
movzx edx, ax
mov ecx, 0x425ad0
lea eax, [ebp - 0x58]
push eax
call fcn.00402f30
add esp, 4
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xb0], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ebp - 0xa0], xmm0
movq xmm0, qword [eax + 0x20]
movq qword [ebp - 0x90], xmm0
mov ax, word [eax + 0x28]
mov word [ebp - 0x88], ax
lea eax, [ebp - 0xb0]
push eax
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
jne 0x406ad8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
sete byte [ebp - 0x76]
jmp 0x406ae3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x76], 1
push 0x41
call esi
movzx edx, ax
mov ecx, 0x4250d8
lea eax, [ebp - 0x208]
push eax
call fcn.00406410
mov esi, eax
lea edi, [ebp - 0x160]
movzx eax, byte [ebp - 0x76]
mov ecx, 0x29
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x80]
add esp, 4
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x24]
push eax
movzx eax, byte [ebp - 0x75]
push ecx
push eax
xor eax, eax
cmp esi, dword [ebp - 0x18]
setne al
push eax
lea eax, [ebp - 0x160]
push eax
push edi
call fcn.004032b0
add esp, 0x18
cmp esi, dword [ebp - 0x18]
je 0x406b57
cmp byte [ebp - 0x77], 0
je 0x406b57
movzx eax, byte [ebp - 0x75]
xor eax, 1
lea eax, [eax*2 + 1]
jmp 0x406b59
xor eax, eax
cmp byte [ebp - 0x76], 0
mov dword [edi + 0x68], eax
je 0x406b69
mov eax, 1
jmp 0x406baa
cmp eax, 3
je 0x406ba5
lea eax, [ebp - 0x24]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 0
push eax
call dword [sym.imp.ntdll.dll_RtlGetNtVersionNumbers]
cmp dword [ebp - 0x18], 0xa
je 0x406ba1
cmp dword [edi + 0x68], 1
je 0x406ba5
xor eax, eax
jmp 0x406baa
mov eax, 2
mov dword [edi + 0x6c], eax
mov esi, str.hLlPxTpHt_
xor eax, eax
cmp byte [ebp - 0x78], al
setne al
mov dword [edi + 0x78], eax
xor eax, eax
cmp byte [ebp - 0x79], al
setne al
mov dword [edi + 0x70], eax
xor eax, eax
cmp byte [ebp - 0x7a], al
setne al
mov dword [edi + 0x74], eax
mov eax, dword [esi]
mov eax, dword [edi + eax]
push dword [eax*4 + 0x425b3c]
mov eax, dword [esi + 4]
push dword [eax + edi]
call dword [sym.imp.USER32.dll_SetWindowTextW]
add esi, 8
cmp esi, 0x4250d4
jne 0x406bd3
mov edx, dword [ebp - 0x60]
cmp edx, 8
jb 0x406c2c
mov ecx, dword [ebp - 0x74]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406c22
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406c6c
push edx
push ecx
call fcn.0040b069
add esp, 8
push dword [ebp - 0x5c]
xor eax, eax
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
call dword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040b05b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.0040e6bc
call fcn.0040e6bc
int3