Function at 0x10001990
Capabilities:
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x410
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x22]
mov word [esp + 0x20], bp
push ebp
rep stosd dword es:[edi], eax
push 0x80
push 3
stosw word es:[edi], ax
mov eax, dword [esp + 0x430]
push ebp
push 1
push closesocket
push eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x34], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10001c14
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0x400
jae 0x10001a0f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x410
ret
mov eax, dword [esp + 0x430]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
je 0x10001a59
push 0
lea ecx, [esi - 4]
push 0
push ecx
push ebx
call edi
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x20]
push 4
push eax
push ebx
call ebp
mov eax, dword [esp + 0x18]
lea ecx, [eax + 0x404]
cmp ecx, esi
jae 0x10001a59
mov edx, 0xfffffffc
sub edx, eax
add esi, edx
push 0
push 0
push 0
push ebx
call edi
push 0x130
call fcn.1000a0b0
lea eax, [eax + esi + 8]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 8
lea ecx, [esp + 0x14]
mov edi, eax
push 0
push ecx
push esi
push edi
push ebx
call ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [edi + esi - 8]
mov ebp, dword [edi + esi - 4]
lea edx, [esi - 4]
push edx
push edi
call fcn.10007990
add esp, 8
cmp eax, ebp
jne 0x10001ab0
mov eax, 0xfffffff8
sub eax, ebx
add esi, eax
push esi
push edi
call fcn.10007990
mov ebx, dword [esp + 0x434]
push 0x130
mov dword [ebx + 0x12c], eax
call fcn.1000a0b0
push 9
push 0x130
lea ecx, [esp + 0x24]
push ebx
lea edx, [edi + esi]
push ecx
push edx
mov dword [esp + 0x30], eax
call fcn.1000a000
mov ebx, dword [esp + 0x30]
add esi, ebx
mov dword [edi + esi], ebx
mov dword [edi + esi + 4], ebp
add esi, 8
lea eax, [esi - 4]
push eax
push edi
call fcn.10007990
add esp, 0x28
mov dword [edi + esi - 8], ebx
mov ebx, dword [esp + 0x428]
mov dword [edi + esi - 4], eax
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor ebp, ebp
push ebp
push 0x80
push 2
push ebp
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10001c0b
lea ecx, [esp + 0x14]
push ebp
push ecx
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x430], ebp
je 0x10001be3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov edx, dword [esp + 0x430]
add esp, 4
mov dword [esp + 0x10], ebp
cmp dword [edx + 0x128], ebp
jbe 0x10001bcd
lea esi, [esp + 0x20]
mov ebp, 0x200
call dword [sym.imp.MSVCRT.dll_rand]
mov word [esi], ax
add esi, 2
dec ebp
jne 0x10001b8c
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x28]
push 0x400
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x42c]
mov eax, dword [esp + 0x10]
inc eax
mov ecx, dword [edx + 0x128]
mov dword [esp + 0x10], eax
cmp eax, ecx
jb 0x10001b83
mov eax, dword [esp + 0x42c]
mov ecx, dword [eax + 0x128]
shl ecx, 0xa
mov dword [esp + 0x10], ecx
jmp 0x10001be7
mov dword [esp + 0x10], ebp
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x18]
push 4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
mov dword [esp + 0x20], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x410
ret