Function at 0x47847c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
mov dword [esp + 0xc], str.GetOsImageDataChunk
mov dword [esp + 8], 0x52f9d4
mov dword [esp + 4], 0x400
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov dword [esp + 0xc], str.GetOsImageDataChunk
mov dword [esp + 8], 0x52f9d4
mov dword [esp + 4], 0x400
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov dword [esp + 8], str.Get_OS_image_data...
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x4786c2
mov eax, dword [ebx + 0x3c]
or eax, dword [ebx + 0x38]
je 0x4786b8
mov eax, dword [ebx]
mov edx, dword [eax + 8]
test edx, edx
je 0x478716
mov dword [esp + 0xc], edx
mov dword [esp + 8], str.RIMGChunkSize_is_:__d
mov dword [esp + 4], 0x10
mov dword [esp], eax
call fcn.00421b78
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], str.OS_Data_Size_is_:__d
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov esi, dword [ebx + 0x38]
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ebx]
mov eax, dword [edx + 8]
shl eax, 9
cmp ecx, 0
jbe 0x47867c
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.allocating_buffer_for_data_to_send...data_size:__d
mov dword [esp + 4], 0x10
mov dword [esp], edx
call fcn.00421b78
mov eax, dword [ebx]
mov eax, dword [eax + 8]
shl eax, 9
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x40], eax
test eax, eax
je 0x4786ec
mov dword [esp + 8], str.reading_data_from_file
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov eax, dword [ebx + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov eax, dword [eax + 8]
shl eax, 9
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov esi, eax
mov edx, dword [ebx]
mov eax, dword [edx + 8]
shl eax, 9
cmp esi, eax
je 0x47860c
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.OS_Data_Size_left:_d___chunk_size:__d
mov dword [esp + 4], 0x10
mov dword [esp], edx
call fcn.00421b78
mov edx, dword [ebx]
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.data_size_to_read:__d
mov dword [esp + 4], 0x10
mov dword [esp], edx
call fcn.00421b78
mov edi, esi
sar edi, 0x1f
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
sub eax, esi
sbb edx, edi
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], str.OS:_Bytes_left_to_send:__d
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov eax, dword [ebx]
mov eax, dword [eax + 8]
shl eax, 9
mov dword [ebx + 0x58], eax
mov eax, dword [ebx + 0x40]
mov dword [ebx + 0x5c], eax
lea eax, [ebx + 0x58]
add esp, 0x3c
pop ebx
pop esi
pop edi
leave
ret
cmp esi, eax
jae 0x478565
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 8], str.OS_Data_Size:_d___chunk_size:__d
mov dword [esp + 4], 0x10
mov dword [esp], edx
call fcn.00421b78
mov edx, dword [ebx]
mov eax, dword [edx + 8]
shl eax, 9
jmp 0x478565
mov eax, dword [ebx]
mov edx, dword [eax + 8]
jmp 0x47850a
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 8
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
cmp edx, 3
je 0x478784
cmp edx, 2
je 0x4787e7
mov dword [esp], eax
call fcn.005099c0
mov dword [esp + 0xc], str.GetOsImageDataChunk
mov dword [esp + 8], 0x52fb91
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
call fcn.00509b8c
xor eax, eax
jmp 0x478673
mov dword [esp], eax
call fcn.005099c0
mov esi, dword [eax]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.GetOsImageDataChunk
mov dword [esp + 8], 0x52fb58
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0047841c
call fcn.00509b8c
xor eax, eax
test esi, esi
jne 0x478673
jmp 0x478670
mov dword [esp], eax
call fcn.005099c0
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.GetOsImageDataChunk
mov dword [esp + 8], 0x52fb7a
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
jmp 0x478778