Function at 0x483770
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x8c
mov ebx, dword [eax + 0x34]
test bl, 7
jne 0x48378a
test byte [eax + 0x30], 7
je 0x4837a0
mov eax, edi
call fcn.00483030
mov esi, eax
mov eax, edx
or eax, esi
jne 0x483a90
mov ebx, dword [edi + 0x34]
test ebx, ebx
je 0x483984
mov ebp, dword [edi]
mov byte [esp + 0x4c], 1
cmp byte [ebp + 0x51], 0
jne 0x4837c0
mov esi, dword [ebp + 0x54]
test esi, esi
jne 0x483a81
mov esi, dword [edi + 0x30]
shr ebx, 3
xor edx, edx
mov ecx, dword [edi + 8]
shr esi, 3
mov dword [esp + 0x68], ecx
mov ecx, dword [edi + 0x14]
mov eax, esi
mov esi, ebx
mov ebx, dword [edi + 0xc]
sub esi, eax
mov dword [esp + 0x6c], eax
add eax, dword [edi + 0x18]
adc edx, dword [edi + 0x1c]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
xor edx, edx
mov dword [esp + 0x58], ebx
mov ebx, esi
add ebx, dword [esp + 0x50]
mov dword [esp + 0x40], esi
mov esi, edx
adc esi, dword [esp + 0x54]
mov dword [esp + 0x60], ebx
mov ebx, dword [esp + 0x50]
cmp ebx, dword [esp + 0x68]
mov edx, dword [edi + 0x10]
mov dword [esp + 0x64], esi
mov esi, dword [esp + 0x54]
sbb esi, dword [esp + 0x58]
jb 0x4839a0
mov ebx, dword [esp + 0x60]
mov esi, dword [esp + 0x64]
mov eax, ecx
cmp edx, ebx
sbb eax, esi
jb 0x4839a0
cmp byte [esp + 0x4c], 0
je 0x483984
movzx ecx, byte [ebp + 0x3a]
mov eax, dword [ebp + 0x5c]
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x60], edi
mov esi, dword [esp + 0x50]
shld edx, eax, cl
shl eax, cl
test cl, 0x20
cmovne edx, eax
cmovne eax, ebx
xor ecx, ecx
mov ebx, ecx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x6c]
add eax, dword [edi + 0x3c]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x68], eax
jmp 0x4838a7
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x40], eax
jne 0x483b30
add ebx, 1
cmp bl, byte [esp + 0x4c]
je 0x483980
add esi, dword [esp + 0x58]
adc edi, dword [esp + 0x5c]
lea eax, [esp + 0x7c]
mov dword [esp + 4], esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.00415e50
mov ecx, edx
or ecx, eax
je 0x483884
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], esi
mov esi, eax
mov dword [esp + 0x54], edi
call fcn.0041d490
mov edi, dword [fcn.004a1b90]
mov dword [esp], 2
mov ebp, eax
call edi
mov ecx, dword [esp + 0x50]
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0x54cc60
mov dword [esp + 4], str.__s__Error_while_writing__Iu_bytes_to_the_FAT__device_offset__I64u_:__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], 0x54ccb8
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call edi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x4c]
jmp 0x48398f
mov edi, dword [esp + 0x60]
mov dword [edi + 0x38], 0
xor esi, esi
xor edx, edx
add esp, 0x8c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [fcn.004a1b90]
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ecx
mov dword [esp], 2
call esi
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x14], str.fat_fat_buffer_flush
mov ebx, dword [esp + 0x64]
mov edi, dword [esp + 0x68]
mov dword [esp + 0x10], 0x7bd
add edx, 0xffffffff
mov dword [esp + 0xc], str.fat.c
adc ecx, 0xffffffff
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x58]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x30], edx
add ecx, 0xffffffff
mov dword [esp + 0x2c], edi
adc ebx, 0xffffffff
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 8], 0x54ce78
mov dword [esp + 4], str.__s___s:_d___s__Attempted_to_write_beyond_FAT_bounds:___I64u___I64u___FAT:___I64u___I64u__
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], 0x54ccb8
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov esi, 6
mov dword [esp], eax
call sub.msvcrt.dll_fflush
add esp, 0x8c
mov eax, esi
xor edx, edx
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [ebp + 0x50]
mov byte [esp + 0x4c], al
jmp 0x4837c0
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x4c], edx
call fcn.0041d490
mov ebp, dword [edi + 0x34]
mov ebx, dword [fcn.004a1b90]
mov edi, dword [edi + 0x30]
mov dword [esp + 0x40], eax
mov dword [esp], 2
call ebx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x54cc60
mov dword [esp + 4], str.__s__Error_while_completing_buffer_with_non_byte_aligned_content__valid_start_bit:__Iu__valid_end_bit:__Iu_:__lu___s_
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], 0x54ccb8
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x4c]
add esp, 0x8c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x50], esi
mov esi, eax
mov dword [esp + 0x54], edi
mov edi, dword [fcn.004a1b90]
mov dword [esp], 2
call edi
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x14], esi
mov dword [esp + 8], 0x54cc60
mov esi, 5
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], str.__s__Partial_write_to_FAT__device_offset:__I64u__wrote__Iu__Iu_bytes_.
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], 0x54ccb8
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call edi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
xor edx, edx
jmp 0x48398f