Function at 0x41ad72
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 0x490310
lea ecx, [esp + 0x38]
call fcn.00431209
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 0x41adc7
mov eax, 0x80070057
mov esi, eax
push eax
call fcn.004314fa
jmp 0x41afc8
cmp dword [ebp + 0x10], eax
je 0x41adb5
lea ecx, [esp + 0x14]
call fcn.00430000
mov esi, eax
test esi, esi
jns 0x41adde
push esi
jmp 0x41adbd
mov edx, dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push eax
lea ecx, [esp + 0x14]
call fcn.00431295
mov esi, eax
test esi, esi
js 0x41addb
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41ae77
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 0x41ae2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004317f4
mov esi, eax
jmp 0x41addb
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 0x41ae77
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x3e5
jne 0x41af07
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 0x41ae1c
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x41af9b
xor esi, esi
cmp dword [esp + 0x28], esi
jne 0x41aec4
cmp dword [esp + 0x2c], esi
jne 0x41aec4
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 0x41af9b
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
je 0x41af9b
push 2
push esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x41af9b
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push dword [esp + 0x18]
push 0x406124
push eax
call fcn.0041a612
mov esi, eax
add esp, 0x10
test esi, esi
jns 0x41af21
push esi
call fcn.004314fa
mov edi, dword [esp + 0x18]
jmp 0x41afaf
test esi, esi
jle 0x41af16
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x41afc8
jmp 0x41addb
mov edi, dword [esp + 0x18]
test edi, edi
je 0x41af2e
mov eax, dword [edi - 4]
jmp 0x41af30
xor eax, eax
push 0
mov dword [esp + 0x1c], eax
call fcn.00431467
mov ecx, dword [esp + 0x18]
xor esi, esi
test ecx, ecx
je 0x41af67
lea eax, [ecx + ecx]
mov dword [esp + 0x18], eax
shr eax, 1
cmp eax, ecx
je 0x41af6d
mov esi, 0x80070216
push esi
call fcn.004314fa
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], eax
jmp 0x41af6d
and dword [esp + 0x18], esi
xor esi, esi
push esi
call fcn.00431467
test esi, esi
js 0x41afa9
push ecx
lea eax, [esp + 0x24]
mov edx, edi
push eax
push dword [esp + 0x20]
mov ecx, ebx
call fcn.0041acb5
mov esi, eax
test esi, esi
js 0x41afa9
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x41afaf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004317f4
mov esi, eax
push esi
call fcn.004314fa
cmp dword [esp + 0x1c], 0
je 0x41afc8
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.00431467
test edi, edi
je 0x41afd8
push edi
call fcn.00431523
cmp dword [esp + 0x10], 0
je 0x41afe8
push dword [esp + 0x10]
call fcn.00431523
cmp dword [esp + 0x14], 0
je 0x41aff8
push dword [esp + 0x14]
call fcn.00431523
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], 0x4020a0
call fcn.00433d41
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret