Function at 0x4a5eb4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x9c
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x19]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56b054
lea esi, [ebp - 0x38]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], str.GetOsImageDataChunk
mov dword [esp + 8], esi
mov dword [esp + 4], 0x400
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x38]
lea esi, [eax - 0xc]
cmp esi, 0x55a154
jne 0x4a63a2
lea eax, [ebp - 0x1a]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56b054
lea esi, [ebp - 0x3c]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], str.GetOsImageDataChunk
mov dword [esp + 8], esi
mov dword [esp + 4], 0x400
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x3c]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a6370
lea eax, [ebp - 0x1b]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Get_OS_image_data...
lea esi, [ebp - 0x40]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x40]
lea esi, [eax - 0xc]
mov ecx, 0x55a154
cmp ecx, esi
jne 0x4a6438
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x4a6314
mov eax, dword [ebx + 0x3c]
or eax, dword [ebx + 0x38]
je 0x4a62d8
mov eax, dword [ebx]
mov edi, dword [eax + 8]
test edi, edi
je 0x4a64f8
lea eax, [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.RIMGChunkSize_is_:__d
lea esi, [ebp - 0x44]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x44]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a633e
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], edx
lea eax, [ebp - 0x1d]
mov dword [esp + 8], eax
mov dword [esp + 4], str.OS_Data_Size_is_:__d
lea esi, [ebp - 0x48]
mov dword [esp], esi
call fcn.00509af0
mov edx, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x7c]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x48]
lea esi, [eax - 0xc]
mov ecx, 0x55a154
cmp ecx, esi
jne 0x4a62e2
mov eax, dword [ebx + 0x38]
mov dword [ebp - 0x80], eax
mov edi, dword [ebx + 0x3c]
mov eax, dword [ebx]
mov esi, dword [eax + 8]
shl esi, 9
cmp edi, 0
jbe 0x4a626c
lea eax, [ebp - 0x1f]
mov dword [esp + 8], eax
mov dword [esp + 4], str.allocating_buffer_for_data_to_send...data_size:__d
lea edi, [ebp - 0x50]
mov dword [esp], edi
call fcn.00509af0
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x50]
lea esi, [eax - 0xc]
mov ecx, 0x55a154
cmp ecx, esi
jne 0x4a64c6
mov eax, dword [ebx]
mov eax, dword [eax + 8]
shl eax, 9
mov dword [esp], eax
call fcn.00538984
mov dword [ebx + 0x40], eax
test eax, eax
je 0x4a646a
lea eax, [ebp - 0x20]
mov dword [esp + 8], eax
mov dword [esp + 4], str.reading_data_from_file
lea esi, [ebp - 0x54]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x54]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a6494
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 eax, dword [ebx]
mov edi, dword [eax + 8]
shl edi, 9
cmp esi, edi
je 0x4a61a4
lea eax, [ebp - 0x21]
mov dword [esp + 8], eax
mov dword [esp + 4], str.OS_Data_Size_left:_d___chunk_size:__d
lea ecx, [ebp - 0x58]
mov dword [esp], ecx
call fcn.00509af0
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
lea eax, [ebp - 0x58]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x58]
lea edi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, edi
jne 0x4a6522
lea eax, [ebp - 0x22]
mov dword [esp + 8], eax
mov dword [esp + 4], str.data_size_to_read:__d
lea edi, [ebp - 0x5c]
mov dword [esp], edi
call fcn.00509af0
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x5c]
lea edi, [eax - 0xc]
mov ecx, 0x55a154
cmp ecx, edi
jne 0x4a6406
mov eax, esi
xor edx, edx
mov esi, dword [ebx + 0x38]
mov edi, dword [ebx + 0x3c]
sub esi, eax
sbb edi, edx
mov dword [ebx + 0x38], esi
mov dword [ebx + 0x3c], edi
lea eax, [ebp - 0x23]
mov dword [esp + 8], eax
mov dword [esp + 4], str.OS:_Bytes_left_to_send:__d
lea eax, [ebp - 0x60]
mov dword [esp], eax
call fcn.00509af0
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
lea edx, [ebp - 0x60]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x60]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a63d4
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, 0x9c
pop ebx
pop esi
pop edi
leave
ret
cmp dword [ebp - 0x80], esi
jae 0x4a607d
lea eax, [ebp - 0x1e]
mov dword [esp + 8], eax
mov dword [esp + 4], str.OS_Data_Size:_d___chunk_size:__d
lea edx, [ebp - 0x4c]
mov dword [esp], edx
call fcn.00509af0
mov dword [esp + 0x14], esi
mov ecx, dword [ebp - 0x80]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edi
lea eax, [ebp - 0x4c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x4c]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a6554
mov eax, dword [ebx]
mov esi, dword [eax + 8]
shl esi, 9
jmp 0x4a607d
mov eax, dword [ebx]
mov edi, dword [eax + 8]
jmp 0x4a5fbf
cmp dword [0x554500], 0
jne 0x4a6627
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a6063
lea eax, [ebp - 0x2b]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a6063
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 8
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
cmp dword [0x554500], 0
jne 0x4a65af
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a6006
lea eax, [ebp - 0x2a]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a6006
cmp dword [0x554500], 0
jne 0x4a65c7
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a5f58
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a5f58
cmp dword [0x554500], 0
jne 0x4a6657
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a5f0d
lea eax, [ebp - 0x27]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a5f0d
cmp dword [0x554500], 0
jne 0x4a660f
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a624d
lea eax, [ebp - 0x31]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a624d
cmp dword [0x554500], 0
jne 0x4a666f
mov eax, dword [edi + 8]
lea edx, [eax - 1]
mov dword [edi + 8], edx
test eax, eax
jg 0x4a61eb
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.005084ec
jmp 0x4a61eb
cmp dword [0x554500], 0
jne 0x4a65df
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a5f9b
lea eax, [ebp - 0x29]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a5f9b
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
cmp dword [0x554500], 0
jne 0x4a663f
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a6122
lea eax, [ebp - 0x2e]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a6122
cmp dword [0x554500], 0
jne 0x4a6582
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a60c4
lea eax, [ebp - 0x2d]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a60c4
mov dword [esp], 4
call fcn.00538b64
mov dword [eax], 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], 0x57285c
mov dword [esp], eax
call fcn.00539374
cmp dword [0x554500], 0
jne 0x4a65f7
mov eax, dword [edi + 8]
lea edx, [eax - 1]
mov dword [edi + 8], edx
test eax, eax
jg 0x4a61a4
lea eax, [ebp - 0x2f]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.005084ec
jmp 0x4a61a4
cmp dword [0x554500], 0
jne 0x4a659a
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a62ca
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a62ca
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a64dc
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a6566
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a6354
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a6386
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a644e
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a6538
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a63ea
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a62f8
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a64aa
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a63b8
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a641c