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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x5c
mov edi, dword [esp + 0x70]
mov ebp, dword [esp + 0x74]
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x78]
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0x7c]
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], ebp
mov dword [esp + 0x3c], ecx
test ebx, ebx
je 0x46f171
cmp ebx, 1
je 0x46f2d3
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
call esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], str.fat_block_stream_init
mov dword [esp + 0x10], 0x8a
mov dword [esp + 0xc], str.block_stream.c
mov dword [esp + 8], 0x5481af
mov dword [esp + 4], str.__s___s:_d___s__Unexpected:_Unknown_fat_stream_block_type_value:__d
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], 0x5481fc
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, 6
xor edx, edx
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ebx, byte [edx + 0x40]
mov ecx, dword [edx + 0x3c]
mov byte [esp + 0x47], bl
mov dword [esp + 0x40], ecx
mov ecx, ebx
mov ebx, 1
xor ebp, ebp
mov edi, 0xffc00000
xor esi, esi
mov dword [eax], edx
shrd edi, ebp, cl
shr ebp, cl
test cl, 0x20
mov dword [eax + 4], ebx
cmovne edi, ebp
cmovne ebp, esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x48], edi
mov ecx, edi
mov edi, dword [esp + 0x2c]
mov edx, esi
mov dword [esp + 0x4c], ebp
and edx, edi
cmp edx, 0xffffffff
je 0x46f2f0
mov ebx, dword [esp + 0x3c]
test ebx, ebx
je 0x46f2f0
mov ecx, ebx
mov ebx, dword [ebx + 0x28]
xor edi, edi
mov dword [esp + 0x2c], edi
lea edx, [ebx - 2]
mov ebx, dword [esp + 0x34]
mov dword [eax + 0x14], edi
mov dword [esp + 0x28], edx
mov dword [eax + 0x10], edx
test ebx, ebx
js 0x46f342
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
mov esi, dword [esp + 0x3c]
mov dword [eax + 0x18], ecx
mov ecx, dword [esp + 0x48]
mov dword [eax + 0x1c], ebx
mov dword [eax + 0x20], esi
mov dword [eax + 0x24], ecx
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
add esi, 0xffffffff
mov ecx, esi
mov esi, dword [esp + 0x40]
adc edi, 0xffffffff
mov ebx, edi
xor edi, edi
add esi, ecx
movzx ecx, byte [esp + 0x47]
adc edi, ebx
xor edx, edx
shrd esi, edi, cl
shr edi, cl
test cl, 0x20
cmovne esi, edi
cmovne edi, edx
mov dword [eax + 0x28], esi
mov dword [eax + 0x2c], edi
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
mov dword [eax + 0xb0], 0
mov edx, dword [esp + 0x84]
mov dword [eax + 0xb8], 0
mov dword [eax + 0xbc], 0
mov dword [eax + 8], edx
xor edx, edx
mov dword [eax + 0xc0], edi
mov dword [eax + 0xc4], ebp
mov dword [eax + 0xc8], 0
mov dword [eax + 0xd0], 0
mov dword [eax + 0xd4], 0
mov dword [eax + 0xd8], 0
mov dword [eax + 0xdc], 0
mov dword [eax + 0xe0], 0
mov dword [eax + 0xe4], 0
add esp, 0x5c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ecx, word [edx + 0x38]
movzx ebx, byte [edx + 0x3a]
mov dword [esp + 0x40], ecx
movzx ecx, byte [edx + 0x40]
mov byte [esp + 0x47], bl
xor ebx, ebx
jmp 0x46f187
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov dword [eax + 0x24], ecx
mov edi, dword [esp + 0x3c]
mov dword [eax + 0x10], ebx
mov ebx, dword [esp + 0x30]
mov dword [eax + 0x14], esi
mov esi, dword [esp + 0x34]
mov dword [eax + 0x18], ebx
mov dword [eax + 0x1c], esi
mov dword [eax + 0x20], edi
test esi, esi
jns 0x46f20e
mov ebx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edx, ebx
and edx, ecx
cmp edx, 0xffffffff
jne 0x46f360
mov dword [eax + 0x28], 0xffffffff
mov dword [eax + 0x2c], 0xffffffff
jmp 0x46f245
mov edx, ecx
mov ecx, dword [ecx + 0x10]
mov ebx, dword [edx + 0x14]
mov dword [eax + 0x20], edx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ebx
mov ebx, dword [esp + 0x48]
mov dword [eax + 0x24], ebx
jmp 0x46f31e
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
call ebx
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [esp + 8], 0x5481ff
mov dword [esp + 4], str.__s__Invalid_value_for_length_bytes:__I64d
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
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 dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, 0x22
xor edx, edx
jmp 0x46f169