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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41d2c0
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x424084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp byte [esi + 0x48], 0
jne 0x40dfa0
lea edi, [esi + 0x4a]
push edi
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [0x42501c]
mov edx, dword [eax + 0xc]
mov ecx, 0x42501c
call edx
add eax, 0x10
mov dword [ebp - 0x68], eax
mov dword [ebp - 4], 0
movzx eax, word [esi + 0x50]
movzx ecx, word [esi + 0x4c]
movzx edx, word [edi]
push eax
push ecx
push edx
push str._02d__02d__02d
lea edi, [ebp - 0x68]
call fcn.0040e900
lea eax, [esi + 0x10]
push eax
lea ecx, [ebp - 0x48]
lea ebx, [esi + 0x2c]
push ecx
call fcn.0040e920
add esp, 0x18
mov edi, eax
mov byte [ebp - 4], 1
mov ebx, dword [ebp - 0x68]
cmp dword [ebx - 4], 1
jle 0x40dec7
mov edx, dword [ebx - 0xc]
push edx
lea eax, [ebp - 0x68]
push eax
call fcn.0040e5b0
mov ebx, dword [ebp - 0x68]
push edi
mov eax, ebx
lea ecx, [ebp - 0x64]
call fcn.00404eb0
push eax
mov eax, 0x4210c8
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.00404eb0
add esp, 8
cmp dword [ebp - 0x50], 8
jb 0x40def9
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.0040ecdf
add esp, 4
xor edi, edi
xor edx, edx
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], edi
mov word [ebp - 0x64], dx
mov byte [ebp - 4], 5
cmp dword [ebp - 0x34], 8
jb 0x40df21
mov eax, dword [ebp - 0x48]
push eax
call fcn.0040ecdf
add esp, 4
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
cmp dword [ebp - 0x18], 8
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], edi
mov word [ebp - 0x48], cx
jae 0x40df3d
lea eax, [ebp - 0x2c]
push edi
push edi
push 4
push edi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x5c], eax
cmp eax, edi
jne 0x40dfa7
cmp dword [ebp - 0x18], 8
mov byte [esi + 0x48], 0
jb 0x40df6d
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0040ecdf
add esp, 4
xor eax, eax
mov word [ebp - 0x2c], ax
lea eax, [ebx - 0x10]
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dfa0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x40e027
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esi + 0x5c]
cmp eax, edi
jbe 0x40dfc3
push 2
push edi
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40dfdc
push edi
lea edx, [ebp - 0x70]
push edx
push 2
lea eax, [ebp - 0x6c]
push eax
push ecx
mov dword [ebp - 0x6c], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x18], 8
mov byte [esi + 0x48], 1
jb 0x40dff2
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0040ecdf
add esp, 4
xor eax, eax
mov word [ebp - 0x2c], ax
lea eax, [ebx - 0x10]
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e025
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040ecd0
mov esp, ebp
pop ebp
ret