Function at 0x4127d0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
mov edx, dword [ebx + 0x18]
mov esi, edx
and esi, 1
je 0x412820
mov eax, dword [ebx]
and edx, 8
mov ecx, dword [ebx + 8]
jne 0x412899
test ecx, ecx
je 0x412a80
mov dword [esp], eax
call fcn.004155c0
mov esi, eax
mov eax, edx
or eax, esi
jne 0x4128a9
mov dword [ebx + 8], 0
add esp, 0x3c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x68]
mov edi, dword [ebx + 0x60]
xor edx, edx
mov ebp, dword [ebx + 0x64]
sub edi, eax
sbb ebp, edx
mov eax, edi
mov edi, 0x64
mul edi
mov edi, dword [ebx + 0x60]
imul ecx, ebp, 0x64
mov ebp, dword [ebx + 0x64]
mov dword [esp + 8], edi
mov edi, 0x64
mov dword [esp + 0xc], ebp
add edx, ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004a0a70
cmp edi, eax
mov ebp, eax
sbb esi, edx
jb 0x412a90
mov edx, dword [ebx + 0x8c]
mov edx, dword [edx + 0x18]
mov byte [edx + 0x70], al
mov dword [esp + 4], edx
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0040c180
mov esi, eax
mov eax, edx
or eax, esi
jne 0x412990
mov eax, dword [ebx]
test byte [ebx + 0x18], 8
je 0x4128b3
mov ecx, dword [ebx + 8]
and dword [eax + 4], 0xfffffffb
xor esi, esi
xor edx, edx
test ecx, ecx
jne 0x4127fb
add esp, 0x3c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
call fcn.00415630
mov esi, eax
mov eax, edx
or eax, esi
jne 0x412b10
mov edx, dword [ebx + 0x18]
test dl, 1
jne 0x4127e5
mov ecx, dword [ebx + 0x8c]
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 8]
mov esi, dword [ecx + 0x14]
mov edi, eax
mov eax, edx
or eax, edi
mov dword [esp + 0x2c], edi
mov edi, dword [ecx + 0x10]
mov ecx, esi
mov dword [esp + 0x28], eax
setne al
movzx eax, al
mov ebp, eax
or ecx, edi
jne 0x412b60
mov esi, 1
cmp esi, edx
sbb ecx, dword [esp + 0x2c]
jae 0x412973
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
call esi
mov dword [esp + 8], 0x4a9540
mov dword [esp + 4], str.__s__Dirty_state_not_0_or_1_at_exfat_volume_close.
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a95ae
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [ebx + 0x1c]
xor ecx, ecx
test edx, edx
setne cl
mov eax, dword [ebx]
cmp ebp, ecx
jne 0x412bf0
mov edx, dword [ebx + 0x18]
jmp 0x4127e7
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x28], edx
call fcn.0041d490
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov edi, eax
call ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x4a9606
mov dword [esp + 4], 0x4a960c
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a95ae
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x28]
mov dword [esp + 0x28], edx
mov dword [esp], 2
call ebx
mov dword [esp + 8], 0x4a9540
mov dword [esp + 4], str.__s__Failed_to_update_percent_in_use.
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a95ae
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x28]
add esp, 0x3c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x50], eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00415630
mov ebx, dword [fcn.004a1b90]
mov dword [esp + 0x28], edx
mov esi, 5
mov dword [esp], 2
call ebx
mov edx, dword [esp + 0x28]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 0x4a9606
mov dword [esp + 0x10], edx
mov dword [esp + 4], str.__s__internal_miscalculation:_percent_in_use_I64d
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a95ae
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
xor edx, edx
jmp 0x412a0f
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x28], edx
call fcn.0041d490
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
mov edi, eax
call ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x4a9606
mov dword [esp + 4], 0x4aa1a8
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x412a34
mov eax, dword [esp + 0x28]
mov edx, dword [fcn.004a1b90]
mov dword [esp], 2
test eax, eax
mov dword [esp + 0x28], edx
jne 0x412c0b
call edx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
mov dword [esp + 8], 0x4a9540
mov dword [esp + 4], 0x4aa204
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [esp + 0x28]
mov dword [esp], 2
call edx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a95ae
call sub.msvcrt.dll_fwrite
mov edx, dword [esp + 0x28]
mov dword [esp], 2
call edx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ecx, 1
jmp 0x41297d
mov edx, dword [ebx + 0x8c]
call fcn.00410400
mov esi, eax
mov eax, edx
or eax, esi
jne 0x412c2a
mov edx, dword [ebx + 0x18]
jmp 0x4127e5
call edx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
mov dword [esp + 8], 0x4a9540
mov dword [esp + 4], 0x4aa278
jmp 0x412b97
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.0041d490
mov edi, dword [fcn.004a1b90]
mov dword [esp], 2
mov ebp, eax
call edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x4a9606
mov dword [esp + 4], str.__s__exfat_volume_write_boot_sector_fields_returned_with_error:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call edi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a95ae
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call edi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x412c03