Function at 0x10017540
Capabilities:
Check os version
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x10183288
push 0x10132540
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, 0x141bc
call fcn.10140530
mov eax, dword [0x10189710]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x20], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0x141c8], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0xa12c], bl
push 0x9fff
push ebx
lea eax, [ebp - 0xa12b]
push eax
call fcn.1012e060
add esp, 0xc
mov byte [ebp - 0x1412c], bl
push 0x9fff
push ebx
lea ecx, [ebp - 0x1412b]
push ecx
call fcn.1012e060
add esp, 0xc
mov byte [ebp - 0x12c], bl
push 0x103
push ebx
lea edx, [ebp - 0x12b]
push edx
call fcn.1012e060
add esp, 0xc
mov dword [ebp - 0x141cc], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x141d0], eax
mov dword [ebp - 0x141c8], 1
or esi, 0xffffffff
cmp dword [0x101a4144], esi
jne 0x10017647
mov dword [ebp - 0x141c4], ebx
push 0x94
push ebx
lea eax, [ebp - 0x141c4]
push eax
call fcn.1012e060
add esp, 0xc
mov dword [ebp - 0x141c4], 0x94
lea ecx, [ebp - 0x141c4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
xor edx, edx
cmp dword [ebp - 0x141b4], 2
sete dl
mov dword [0x101a4144], edx
mov dword [ebp - 0x141c8], 2
push 0x101a6e20
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x141c8], 4
mov ecx, dword [0x101aaadc]
cmp ecx, 1
jne 0x10017698
mov eax, dword [0x10196b8c]
call fcn.10067fc0
test eax, eax
je 0x1001792c
push 0x10196b8c
call fcn.10082e10
mov dword [0x10196b8c], esi
jmp 0x1001792c
mov dword [ebp - 0x141c8], 5
mov eax, dword [0x10196b8c]
call fcn.10067fc0
test eax, eax
jne 0x10017724
cmp ecx, ebx
jne 0x10017724
mov dword [ebp - 0x141c8], 0x33
push bind
push 4
push 3
push 0xc0000000
mov edi, 0x101aacf8
call fcn.1005aa40
add esp, 0x10
mov ecx, eax
mov dword [0x10196b8c], ecx
mov dword [ebp - 0x141c8], 0x34
call fcn.10067fc0
test eax, eax
jne 0x10017703
mov dword [ebp - 0x141c8], 0x35
jmp 0x1001792c
mov dword [ebp - 0x141c8], 0x36
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x101aa9d4], eax
cmp eax, esi
jne 0x10017724
mov dword [0x101aa9d4], ebx
mov dword [ebp - 0x141c8], 0x37
push 1
xor ecx, ecx
lea edx, [ebp - 0x12c]
call fcn.10082fc0
add esp, 4
mov dword [ebp - 0x141c8], 6
cmp dword [0x101a4144], ebx
je 0x1001777d
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x12c]
push eax
push str._s__04x__04x__
lea ecx, [ebp - 0x1412c]
push ecx
call fcn.10127dc0
add esp, 0x14
jmp 0x100177a4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor eax, 0xff000000
push eax
lea edx, [ebp - 0x12c]
push edx
push str._s__0x_08x___
lea eax, [ebp - 0x1412c]
push eax
call fcn.10127dc0
add esp, 0x10
mov dword [ebp - 0x141c8], 7
lea ecx, [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0xa12c]
push eax
call fcn.1012b69a
add esp, 0xc
cmp dword [0x101ab00c], ebx
je 0x100177e1
lea ecx, [ebp - 0xa12c]
push ecx
push 0x10158254
call fcn.10128a81
add esp, 8
mov dword [ebp - 0x141c8], 8
cmp byte [ebp - 0xa12c], 0xa
jne 0x100177fc
mov byte [ebp - 0x1412c], bl
jmp 0x1001782d
lea eax, [ebp - 0xa12c]
mov edx, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10017804
sub eax, edx
lea edi, [ebp - 0x1412c]
add edi, esi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x10017815
mov ecx, eax
mov esi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x141c8], 9
push 0xd
lea edx, [ebp - 0x1412c]
push edx
call fcn.10128490
add esp, 8
test eax, eax
jne 0x10017864
lea edi, [ebp - 0x1412c]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x10017853
mov ax, word [0x10159624]
mov word [edi], ax
push 0xa
lea ecx, [ebp - 0x1412c]
push ecx
call fcn.10128490
add esp, 8
test eax, eax
jne 0x10017892
lea edi, [ebp - 0x1412c]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x10017880
mov dx, word [0x1015804c]
mov word [edi], dx
mov dword [ebp - 0x141c8], 0xa
mov ecx, dword [0x10196b8c]
mov eax, ecx
call fcn.10067fc0
test eax, eax
je 0x1001792c
push 2
push ebx
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x10017922
mov dword [ebp - 0x141c8], 0xb
lea eax, [ebp - 0x1412c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100178d4
sub eax, edx
mov esi, eax
push ebx
lea eax, [ebp - 0x141cc]
push eax
push esi
lea ecx, [ebp - 0x1412c]
push ecx
mov edx, dword [0x10196b8c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10017922
mov dword [ebp - 0x141c8], 0xd
cmp esi, dword [ebp - 0x141cc]
jne 0x10017922
mov dword [ebp - 0x141c8], 0xe
add dword [0x101aa9d4], esi
push 0x10196b8c
call fcn.10082e10
mov dword [ebp - 0x141c8], 0xf
push 0x101a6e20
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x141d0]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1001796f
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.10127db1
mov esp, ebp
pop ebp
ret