Function at 0x472310
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [esp + 0x84]
mov edi, dword [esp + 0x80]
mov edx, dword [esp + 0x88]
mov dword [esp + 0x38], eax
mov esi, dword [edi + 4]
mov eax, dword [esp + 0x80]
mov dword [esp + 0x3c], edx
mov eax, dword [eax]
test esi, esi
je 0x472500
movzx ecx, byte [eax + 0x40]
mov esi, dword [eax + 0x80]
mov eax, dword [eax + 0x84]
mov dword [esp + 0x40], eax
movzx eax, cl
mov edx, dword [esp + 0x3c]
xor ebx, ebx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x38]
shrd eax, edx, cl
shr edx, cl
test cl, 0x20
mov ecx, dword [esp + 0x3c]
cmovne eax, edx
cmovne edx, ebx
not ecx
shr ecx, 0x1f
mov ebx, edx
cmp eax, esi
sbb ebx, dword [esp + 0x40]
mov ebp, ecx
setb cl
mov dword [esp + 0x48], eax
mov edi, edx
mov ebx, ebp
test cl, bl
je 0x472460
test edx, edx
js 0x472460
mov edi, eax
lea eax, [esp + 0x58]
xor ebp, ebp
mov dword [esp + 0x10], eax
lea eax, [esp + 0x54]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 4], edi
mov dword [esp + 8], ebp
mov dword [esp], eax
call fcn.0046ffc0
mov ebx, eax
mov eax, edx
mov esi, edx
or eax, ebx
jne 0x472590
mov eax, dword [esp + 0x54]
test eax, eax
je 0x472513
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x4724f0
mov eax, dword [esp + 0x58]
movzx ecx, byte [esp + 0x4c]
mov edx, dword [esp + 0x5c]
shld edx, eax, cl
shl eax, cl
test cl, 0x20
je 0x472418
mov edx, eax
xor eax, eax
mov dword [esp + 0x40], eax
mov eax, edi
xor edi, edi
shl eax, cl
test cl, 0x20
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x44], edx
cmovne eax, edi
mov edi, dword [esp + 0x8c]
xor edx, edx
sub ecx, eax
mov eax, ecx
add eax, dword [esp + 0x40]
adc edx, dword [esp + 0x44]
mov dword [edi], eax
mov eax, ebx
mov dword [edi + 4], edx
add esp, 0x6c
mov edx, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [fcn.004a1b90]
mov dword [esp], 2
call ebp
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x48]
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0xc], ebx
mov ebx, 0x22
mov dword [esp + 0x10], esi
xor esi, esi
mov dword [esp + 8], 0x5481ff
mov dword [esp + 4], str.__s__offset_out_of_range:__I64d__block:__I64d__total_block_count:__I64u_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebp
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x5481fc
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebp
mov dword [esp], eax
call sub.msvcrt.dll_fflush
add esp, 0x6c
mov eax, ebx
mov edx, esi
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ecx, byte [eax + 0x3a]
mov esi, dword [eax + 0x48]
mov eax, dword [eax + 0x4c]
mov dword [esp + 0x40], eax
jmp 0x47235c
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
xor esi, esi
call ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebp
mov dword [esp + 8], 0x5481ff
mov dword [esp + 4], str.__s__Encountered_end_of_block_chain_while_searching_for_block_index__I64u.
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], 0x5481fc
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov ebx, 0x22
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x4724f0
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.0041d490
mov edx, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], edx
call edx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], ebp
mov dword [esp + 8], 0x5481ff
mov dword [esp + 4], str.__s__Failed_to_get_block_number_from_block_index__I64u:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [esp + 0x38]
mov dword [esp], 2
call edx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x5481fc
call sub.msvcrt.dll_fwrite
mov edx, dword [esp + 0x38]
mov dword [esp], 2
call edx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
add esp, 0x6c
mov eax, ebx
mov edx, esi
pop ebx
pop esi
pop edi
pop ebp
ret