Function at 0x41aecf
Capabilities:
Get file size
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
push esi
push edi
push 0x491310
lea ecx, [esp + 0x38]
call fcn.00431ef2
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [esp + 0x14], eax
mov edi, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edi
mov word [esp + 0xc], 0xbbef
mov byte [esp + 0xe], 0xbf
mov dword [esp + 0x1c], eax
test ebx, ebx
jne 0x41af24
mov eax, 0x80070057
mov esi, eax
push eax
call fcn.004321e3
jmp 0x41b125
cmp dword [ebp + 0x10], eax
je 0x41af12
lea ecx, [esp + 0x14]
call fcn.00430cd0
mov esi, eax
test esi, esi
jns 0x41af3b
push esi
jmp 0x41af1a
mov edx, dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push eax
lea ecx, [esp + 0x14]
call fcn.00431f7e
mov esi, eax
test esi, esi
js 0x41af38
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41afd4
xor esi, esi
mov dword [esp + 0x54], eax
push eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x41af89
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004324dd
mov esi, eax
jmp 0x41af38
lea eax, [esp + 0x44]
push eax
push esi
push 3
push esi
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_LockFileEx]
mov dword [esp + 0x1c], 1
test eax, eax
jne 0x41afd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x3e5
jne 0x41b064
push dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x4c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x41af79
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x41b0f8
xor esi, esi
cmp dword [esp + 0x28], esi
jne 0x41b021
cmp dword [esp + 0x2c], esi
jne 0x41b021
push esi
lea eax, [esp + 0x24]
push eax
push 3
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41b0f8
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
je 0x41b0f8
push 2
push esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x41b0f8
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push dword [esp + 0x18]
push 0x406124
push eax
call fcn.0041a772
mov esi, eax
add esp, 0x10
test esi, esi
jns 0x41b07e
push esi
call fcn.004321e3
mov edi, dword [esp + 0x18]
jmp 0x41b10c
test esi, esi
jle 0x41b073
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x41b125
jmp 0x41af38
mov edi, dword [esp + 0x18]
test edi, edi
je 0x41b08b
mov eax, dword [edi - 4]
jmp 0x41b08d
xor eax, eax
push 0
mov dword [esp + 0x1c], eax
call fcn.00432150
mov ecx, dword [esp + 0x18]
xor esi, esi
test ecx, ecx
je 0x41b0c4
lea eax, [ecx + ecx]
mov dword [esp + 0x18], eax
shr eax, 1
cmp eax, ecx
je 0x41b0ca
mov esi, 0x80070216
push esi
call fcn.004321e3
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], eax
jmp 0x41b0ca
and dword [esp + 0x18], esi
xor esi, esi
push esi
call fcn.00432150
test esi, esi
js 0x41b106
push ecx
lea eax, [esp + 0x24]
mov edx, edi
push eax
push dword [esp + 0x20]
mov ecx, ebx
call fcn.0041ae15
mov esi, eax
test esi, esi
js 0x41b106
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x41b10c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004324dd
mov esi, eax
push esi
call fcn.004321e3
cmp dword [esp + 0x1c], 0
je 0x41b125
lea eax, [esp + 0x44]
push eax
push 0
push 3
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
push esi
call fcn.00432150
test edi, edi
je 0x41b135
push edi
call fcn.0043220c
cmp dword [esp + 0x10], 0
je 0x41b145
push dword [esp + 0x10]
call fcn.0043220c
cmp dword [esp + 0x14], 0
je 0x41b155
push dword [esp + 0x14]
call fcn.0043220c
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], 0x4020a0
call fcn.00434a31
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret