Function at 0x41704b
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 0x47c0f0
lea ecx, [esp + 0x38]
call fcn.00425578
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [esp + 0x1c], eax
mov esi, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
mov word [esp + 0xc], 0xbbef
mov byte [esp + 0xe], 0xbf
mov dword [esp + 0x14], eax
test ebx, ebx
jne 0x41709f
mov ecx, 0x80070057
mov edi, ecx
call fcn.00427566
jmp 0x4172a7
cmp dword [ebp + 0x10], eax
je 0x41708e
lea ecx, [esp + 0x1c]
call fcn.004260fd
mov edi, eax
test edi, edi
jns 0x4170b7
mov ecx, edi
jmp 0x417095
mov edx, dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push eax
lea ecx, [esp + 0x1c]
call fcn.0042664c
mov edi, eax
test edi, edi
js 0x4170b3
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x417151
xor edi, edi
mov dword [esp + 0x54], eax
push eax
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x417106
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.0042754e
mov edi, eax
jmp 0x4170b3
lea eax, [esp + 0x44]
push eax
push edi
push 3
push edi
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_LockFileEx]
mov dword [esp + 0x14], 1
test eax, eax
jne 0x417151
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x3e5
jne 0x4171e2
push dword [esp + 0x14]
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 0x4170f5
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x417278
xor edi, edi
cmp dword [esp + 0x28], edi
jne 0x41719e
cmp dword [esp + 0x2c], edi
jne 0x41719e
push edi
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 0x417278
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
je 0x417278
push 2
push edi
push edi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x417278
push dword [esp + 0x18]
lea eax, [esp + 0x14]
push dword [esp + 0x20]
push 0x406c8c
push eax
call fcn.00416afb
mov edi, eax
add esp, 0x10
test edi, edi
jns 0x4171fc
mov ecx, edi
call fcn.00427566
mov esi, dword [esp + 0x10]
jmp 0x41728e
test edi, edi
jle 0x4171f1
movzx edi, di
or edi, 0x80070000
test edi, edi
jns 0x4172a7
jmp 0x4170b3
mov esi, dword [esp + 0x10]
test esi, esi
je 0x417209
mov eax, dword [esi - 4]
jmp 0x41720b
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x10], eax
call fcn.0042757e
mov ecx, dword [esp + 0x10]
xor edi, edi
test ecx, ecx
je 0x417243
lea eax, [ecx + ecx]
mov dword [esp + 0x10], eax
shr eax, 1
cmp eax, ecx
je 0x417249
mov edi, 0x80070216
mov ecx, edi
call fcn.00427566
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
jmp 0x417249
and dword [esp + 0x10], edi
xor edi, edi
mov ecx, edi
call fcn.0042757e
test edi, edi
js 0x417287
push ecx
lea eax, [esp + 0x24]
mov edx, esi
push eax
push dword [esp + 0x18]
mov ecx, ebx
call fcn.00416f74
mov edi, eax
test edi, edi
js 0x417287
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x41728e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.0042754e
mov edi, eax
mov ecx, edi
call fcn.00427566
cmp dword [esp + 0x14], 0
je 0x4172a7
lea eax, [esp + 0x44]
push eax
push 0
push 3
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
mov ecx, edi
call fcn.0042757e
test esi, esi
je 0x4172b9
mov ecx, esi
call fcn.00427347
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x4172c6
call fcn.00427347
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4172d3
call fcn.00427347
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], 0x4010e8
call fcn.004286ff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret