Function at 0x4854a0
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov edi, dword [esp + 0xc0]
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x40], 0xfffffff
mov ebp, dword [edi + 0x58]
mov esi, dword [edi + 0x5c]
mov eax, dword [eax + 0x20]
movzx edi, word [edi + 0x38]
mov word [esp + 0x28], di
cmp eax, 2
je 0x4854eb
cmp eax, 1
mov edx, 0xffff
mov eax, 0xfff
cmove eax, edx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xc0]
mov byte [esp + 0x93], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov eax, dword [eax]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xc0]
mov eax, dword [eax + 0xcc]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0xc0]
movzx eax, byte [eax + 0x60]
mov dword [esp + 4], 0x100000
mov dword [esp], 0
mov byte [esp + 0x34], al
lea eax, [esp + 0x98]
mov dword [esp + 8], eax
call fcn.00427280
mov ecx, edx
mov edi, eax
or ecx, eax
jne 0x485a83
mov eax, dword [esp + 0xc0]
mov ebx, 0x8000
mov edi, dword [esp + 0x98]
mov edx, dword [eax + 0x84]
mov eax, dword [eax + 0x80]
cmp ebx, eax
sbb ecx, edx
jb 0x4858a0
mov dword [esp + 0x7c], 0
mov edx, 0xc
lea eax, [esp + 0x94]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp], 0
call fcn.00427280
mov ebx, edx
mov dword [esp + 0x88], eax
or ebx, eax
mov dword [esp + 0x8c], edx
jne 0x485d40
mov eax, dword [esp + 0xc0]
xor edx, edx
xor ebx, ebx
movzx ecx, byte [eax + 0x3a]
mov eax, dword [eax + 0x58]
shld edx, eax, cl
shl eax, cl
test cl, 0x20
cmovne edx, eax
cmovne eax, ebx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x5c], edx
movzx ebx, byte [eax + 0x51]
cmp bl, 2
je 0x4859c0
test bl, bl
jne 0x485de7
mov ecx, dword [esp + 0x58]
mov ebx, dword [esp + 0x5c]
mov eax, ecx
and eax, 0x7ffff
mov dword [esp + 0x30], eax
je 0x485633
mov edx, ecx
mov dword [esp + 0x5c], ebx
and edx, 0xfff80000
mov dword [esp + 0x58], edx
mov eax, esi
xor ebx, ebx
movzx ecx, word [esp + 0x28]
xor edx, edx
add eax, ebp
movzx esi, byte [esp + 0x34]
mov dword [esp + 0x54], 1
adc edx, ebx
mov dword [esp + 0x50], 0
xor ebp, ebp
mov ebx, edx
mul ecx
mov dword [esp + 0x68], esi
imul ebx, ecx
mov ecx, 0x80000
mov dword [esp + 0x84], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x4c], edx
lea edx, [esi + 7]
mov dword [esp + 0x48], eax
sar edx, 3
lea eax, [edi + 0x80000]
mov dword [esp + 0x3c], eax
sub ecx, edx
mov eax, esi
add dword [esp + 0x4c], ebx
sar eax, 2
add eax, dword [esp + 0x30]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x44], 0x8000
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x94]
mov esi, dword [esp + 0x78]
lea ecx, [esi + esi*2]
mov edx, esi
lea ebx, [ecx*4]
shl edx, 0xf
add eax, ebx
lea ecx, [edx + 2]
mov dword [esp + 0x80], ebx
mov dword [eax], ecx
lea ecx, [edx + 0x8001]
mov dword [eax + 4], ecx
cmp dword [esp + 0x7c], esi
je 0x4859e2
xor ebx, ebx
mov dword [esp + 0x38], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x28], ebx
jmp 0x485787
cmp byte [esp + 0x34], 0x10
je 0x4858d4
lea eax, [esp + 0x9c]
mov edx, dword [esp + 0x68]
lea ecx, [esp + 0x93]
mov dword [esp], eax
mov eax, ebp
call fcn.00483340
mov ecx, dword [esp + 0x30]
xor ebx, ebx
test dword [esp + 0x40], eax
sete bl
test ecx, ecx
je 0x48575e
cmp dword [esp + 0x38], ebx
je 0x4858e5
mov edx, dword [esp + 0x38]
test edx, edx
jne 0x485913
mov dword [esp + 0x38], ebx
mov dword [esp + 0x30], 1
movzx eax, byte [esp + 0x9c]
add dword [esp + 0x28], 1
add ebp, eax
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x44], eax
jbe 0x485940
test ebp, ebp
je 0x4858c0
mov ecx, dword [esp + 0x3c]
cmp ebp, ecx
jbe 0x485885
mov eax, ebp
sub eax, ecx
cmp eax, dword [esp + 0x6c]
jbe 0x485885
mov eax, dword [esp + 0x98]
mov dword [esp + 8], 0x80000
sub ebp, 0x80000
mov dword [esp + 0x9c], 0
lea edx, [eax + 0x80000]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov esi, dword [esp + 0x50]
mov eax, dword [esp + 0x48]
xor edi, edi
mov edx, dword [esp + 0x4c]
shl esi, 0x13
add esi, dword [esp + 0x58]
adc edi, dword [esp + 0x5c]
mov ebx, edi
cmp esi, eax
sbb ebx, edx
jae 0x485b63
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov ebx, 0x7ffff
mov ecx, 0
sub eax, esi
sbb edx, edi
cmp ebx, eax
mov ebx, 0x80000
sbb ecx, edx
jae 0x4858f0
lea eax, [esp + 0x9c]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 8], edi
mov dword [esp], eax
call fcn.00415cf0
mov ecx, edx
or ecx, eax
jne 0x485bf0
mov eax, dword [esp + 0x9c]
cmp eax, ebx
jne 0x485ca0
mov ebx, dword [esp + 0x54]
mov eax, dword [esp + 0x64]
mov dword [esp + 0x54], 0
add dword [esp + 0x50], 1
add eax, ebp
test ebx, ebx
cmovne ebp, eax
cmp byte [esp + 0x34], 0x20
jne 0x485710
mov eax, dword [ebp]
mov byte [esp + 0x9c], 4
jmp 0x485737
add eax, 0x7fff
adc edx, 0
shrd eax, edx, 0xf
lea edx, [eax + eax*2]
sub eax, 1
shl edx, 2
mov dword [esp + 0x7c], eax
jmp 0x485597
mov dword [esp + 0x9c], 0
mov ebp, dword [esp + 0x3c]
jmp 0x4857db
movzx eax, word [ebp]
mov byte [esp + 0x9c], 2
jmp 0x485737
add dword [esp + 0x30], 1
jmp 0x48576a
mov ebx, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], 0x80000
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
jmp 0x485825
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x70]
sub edx, edi
mov ecx, edi
call fcn.00484f30
add dword [esp + 0x74], edi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x30], 1
jmp 0x48576a
mov ebx, eax
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x485dc9
mov esi, dword [esp + 0x74]
mov edi, dword [esp + 0x80]
mov eax, dword [esp + 0x94]
mov edx, dword [esp + 0x44]
add dword [esp + 0x84], esi
mov dword [eax + edi + 8], esi
mov edi, dword [esp + 0x70]
shr edx, 5
add dword [esp + 0x78], 1
mov esi, dword [esp + 0x78]
lea ebx, [edi + edx*4]
mov dword [esp + 0x70], ebx
cmp dword [esp + 0x7c], esi
jae 0x4856ba
mov esi, dword [esp + 0xc0]
mov ebx, dword [esp + 0x84]
mov edi, dword [esp + 0x88]
mov edx, dword [esp + 0x8c]
mov dword [esi + 0x90], ebx
jmp 0x485b11
mov eax, dword [eax + 0x5c]
xor edx, edx
xor ebx, ebx
shld edx, eax, cl
shl eax, cl
test cl, 0x20
cmovne edx, eax
cmovne eax, ebx
add dword [esp + 0x58], eax
adc dword [esp + 0x5c], edx
jmp 0x48560e
mov esi, dword [esp + 0xc0]
mov ecx, dword [esi + 0x80]
lea ebx, [ecx + 1]
sub ecx, edx
mov dword [eax + 4], ebx
mov dword [esp + 0x44], ecx
cmp ecx, 0x8000
jbe 0x4856ee
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov edi, 0x16
call ebx
mov esi, dword [esp + 0x44]
mov dword [esp + 8], 0x54cc60
mov dword [esp + 4], str.__s__Window_size_larger_than_FAT_WINDOW_SIZE:__u
mov dword [esp + 0xc], esi
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 eax, dword [esp + 0x94]
xor edx, edx
jmp 0x485b11
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x28], edx
call fcn.0041d490
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov esi, eax
call ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x100000
mov dword [esp + 8], 0x54cc60
mov dword [esp + 4], str.__s__Error_while_allocating_temporary__Iu_byte_sized_buffer_pfe:__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 eax, dword [esp + 0x94]
mov edx, dword [esp + 0x28]
test eax, eax
je 0x485b30
lea ecx, [esp + 0x94]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 0x28], edx
call fcn.0041d440
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x98]
test eax, eax
je 0x485b56
lea esi, [esp + 0x98]
mov dword [esp], eax
mov dword [esp + 4], esi
mov dword [esp + 0x28], edx
call fcn.0041d440
mov edx, dword [esp + 0x28]
add esp, 0xac
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov edi, 6
call ebx
mov dword [esp + 0x14], str.fat_fat_evaluate_virtual_bitmap
mov dword [esp + 0x10], 0x302
mov dword [esp + 0xc], str.fat.c
mov dword [esp + 8], 0x54ce78
mov dword [esp + 4], str.__s___s:_d___s__Would_read_entries_beyond_the_FAT._Bailing_out.
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
xor edx, edx
mov eax, dword [esp + 0x94]
jmp 0x485b11
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edi
mov edi, eax
call fcn.0041d490
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov esi, eax
call ebx
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0x54cc60
mov dword [esp + 4], str.__s__Error_while_reading__Iu_byte_chunk_from_offset__I64u:__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 + 0x30]
jmp 0x485be3
mov dword [esp + 0x2c], edi
mov edi, eax
mov dword [esp + 0x30], ebx
mov ebx, dword [fcn.004a1b90]
mov dword [esp + 0x28], esi
mov dword [esp], 2
call ebx
mov ecx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x28]
mov dword [esp + 0x1c], 0x80000
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edi
mov edi, 5
mov dword [esp + 0x14], ebp
mov dword [esp + 8], 0x54cc60
mov dword [esp + 4], str.__s__Short_read_while_reading__Iu_byte_chunk_from_offset__I64u:__Iu__Iu_bytes_read
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
xor edx, edx
jmp 0x485be3
mov dword [esp + 4], edx
mov ebp, edx
mov edi, eax
mov dword [esp], eax
call fcn.0041d490
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov esi, eax
call ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x54cc60
mov dword [esp + 4], str.__s__Failed_to_allocate_memory_for_setting_up_volume_windows:__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 eax, dword [esp + 0x94]
mov edx, ebp
jmp 0x485b11
mov eax, dword [esp + 0x30]
sub ebx, eax
mov ecx, eax
mov edx, ebx
mov ebx, eax
mov eax, dword [esp + 0x70]
call fcn.00484f30
add dword [esp + 0x74], ebx
jmp 0x48594e
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
mov edi, 6
call esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], str.fat_fat_evaluate_virtual_bitmap
mov dword [esp + 0x10], 0x2a4
mov dword [esp + 0xc], str.fat.c
mov dword [esp + 8], 0x54ce78
mov dword [esp + 4], str.__s___s:_d___s__Internal_inconsistency___Invalid_value_for_active_fat:__u
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 dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [esp + 0x94]
xor edx, edx
jmp 0x485b11