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

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
test ebx, ebx
push ebp
push esi
push edi
mov esi, ecx
je 0x2406f42
mov eax, dword [esi + 0x24]
lea edi, [eax - 0x19]
mov eax, 0x264bbabd
mul edi
mov eax, edi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0x12
mov ecx, eax
mov eax, edi
xor edx, edx
mov edi, 0x6f580
div edi
shl ecx, 7
cmp edx, 0x80
jbe 0x2406d70
lea edi, [edx - 0x80]
mov eax, 0x2660e163
mul edi
sub edi, edx
shr edi, 1
add edi, edx
shr edi, 0xb
add ecx, edi
cmp ebx, ecx
mov eax, ebx
jb 0x2406d78
mov eax, ecx
sub ecx, eax
mov edi, ecx
mov eax, edi
shr eax, 7
mov ecx, eax
shl ecx, 5
add ecx, eax
lea ecx, [ecx + ecx*2]
lea ebp, [ecx + ecx*8]
shl ebp, 2
mov ebx, edi
sub ebp, eax
and ebx, 0x7f
shl ebp, 7
test ebx, ebx
mov dword [esp + 0x14], edi
lea ecx, [ebp + 0x19]
je 0x2406dbe
mov eax, ebx
shl eax, 5
add eax, ebx
lea eax, [eax + eax*2]
lea edx, [eax + eax*8]
shl edx, 1
sub edx, ebx
lea ecx, [ecx + edx*2 + 0x80]
mov eax, dword [esi]
push 0
push 0
push ecx
push eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x2406de7
pop edi
mov dword [esi + 0x28], 0xa
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x208
ret 4
mov ecx, dword [esi]
push ecx
call dword [sym.imp.kernel32.dll_SetEndOfFile]
test eax, eax
jne 0x2406e08
pop edi
mov dword [esi + 0x28], 4
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 4
test ebx, ebx
je 0x2406ea5
xor eax, eax
push eax
push eax
mov ecx, 0x80
lea edi, [esp + 0x20]
lea edx, [ebx + ebp + 0x19]
rep stosd dword es:[edi], eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x2406e48
pop edi
mov dword [esi + 0x28], 0xa
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x208
ret 4
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x14]
push ecx
mov edi, 0x80
sub edi, ebx
push edi
lea edx, [esp + 0x24]
push edx
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
jne 0x2406e85
pop edi
mov dword [esi + 0x28], 4
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 4
cmp dword [esp + 0x10], edi
je 0x2406ea1
pop edi
mov dword [esi + 0x28], 4
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x208
ret 4
mov edi, dword [esp + 0x14]
mov ecx, dword [esi]
push 0
push ecx
mov dword [esi + 0x44], 0xffffffff
call dword [sym.imp.kernel32.dll_GetFileSize]
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x18]
cmp eax, edi
jae 0x2406ec3
mov edi, eax
mov eax, dword [esi + 0x40]
test eax, eax
mov dword [esi + 0x18], edi
jne 0x2406f42
inc dword [esi + 8]
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edx, dword [esi]
push 0
push 0
push 0
push edx
mov dword [esi + 0xc], eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x2406f03
pop edi
mov dword [esi + 0x28], 0xa
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x208
ret 4
mov edx, dword [esi]
push 0
lea eax, [esp + 0x14]
push eax
push 0x19
lea ecx, [esi + 4]
push ecx
push edx
mov dword [esp + 0x24], 0
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x2406f2c
cmp dword [esp + 0x10], 0x19
je 0x2406f42
pop edi
mov dword [esi + 0x28], 4
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x208
ret 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x208
ret 4