Function at 0x5b4f30
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
xor esi, esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, ecx
lea eax, [esp + 0x10]
push esi
mov ebp, 8
mov edx, dword [ebx + 0x100]
push eax
lea ecx, [esp + 0x2c]
push ebp
push ecx
push edx
mov dword [esp + 0x24], esi
call edi
test eax, eax
je 0x5b5371
cmp dword [esp + 0x10], ebp
jne 0x5b5371
mov eax, dword [ebx + 0x70]
add eax, ebp
mov dword [ebx + 0x70], eax
mov edx, dword [ebx + 0x74]
mov eax, dword [esp + 0x24]
adc edx, esi
push eax
mov dword [ebx + 0x74], edx
call fcn.006010b2
cdq
mov ebp, eax
mov esi, edx
cmp ebp, 1
jne 0x5b5030
test esi, esi
jne 0x5b5030
mov eax, dword [ebx + 0x100]
lea ecx, [esp + 0x10]
push edx
mov esi, 8
push ecx
lea edx, [esp + 0x34]
push esi
push edx
push eax
call edi
test eax, eax
je 0x5b5371
cmp dword [esp + 0x10], esi
jne 0x5b5371
mov edx, dword [ebx + 0x70]
add edx, esi
mov dword [ebx + 0x70], edx
mov ecx, dword [ebx + 0x74]
adc ecx, 0
mov dword [ebx + 0x74], ecx
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.006010b2
mov edx, dword [esp + 0x30]
mov edi, eax
push edx
call fcn.006010b2
cdq
mov ebp, eax
mov eax, edi
mov esi, edx
push 1
cdq
push 0
push edx
push eax
call fcn.0060c730
add ebp, eax
adc esi, edx
test esi, esi
jg 0x5b501e
jl 0x5b5371
cmp ebp, 0x10
jb 0x5b5371
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
add ebp, 0xfffffff0
adc esi, 0xffffffff
mov dword [esp + 0x18], esi
jmp 0x5b506d
test ebp, ebp
jne 0x5b5050
test esi, esi
jne 0x5b5052
mov ebp, dword [ebx + 0x68]
mov edx, dword [ebx + 0x70]
mov eax, dword [ebx + 0x6c]
mov ecx, dword [ebx + 0x74]
sub ebp, edx
sbb eax, ecx
mov dword [esp + 0x18], eax
mov esi, eax
jmp 0x5b506d
test esi, esi
jg 0x5b5063
jl 0x5b5371
cmp ebp, 8
jb 0x5b5371
add ebp, 0xfffffff8
adc esi, 0xffffffff
mov dword [esp + 0x18], esi
lea ecx, [esp + 0x28]
mov eax, str.moof
mov edx, dword [ecx]
mov ecx, dword [eax]
cmp edx, ecx
jne 0x5b50c5
mov ecx, dword [esp + 0x3c]
mov edx, dword [ebx + 0x100]
lea eax, [esp + 0x10]
push 0
push eax
push ebp
push ecx
push edx
call edi
test eax, eax
je 0x5b5371
mov ecx, dword [esp + 0x10]
cmp ecx, ebp
jne 0x5b5371
mov eax, dword [esp + 0x44]
mov edx, dword [eax + 4]
mov eax, dword [eax]
push edx
push eax
push ecx
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, ebx
call fcn.005b54d0
jmp 0x5b531c
lea eax, [esp + 0x28]
mov edx, str.sidx
mov ecx, dword [eax]
mov eax, dword [edx]
cmp ecx, eax
jne 0x5b511d
mov eax, dword [esp + 0x3c]
mov ecx, dword [ebx + 0x100]
lea edx, [esp + 0x10]
push 0
push edx
push ebp
push eax
push ecx
call edi
test eax, eax
je 0x5b5371
mov ecx, dword [esp + 0x10]
cmp ecx, ebp
jne 0x5b5371
mov eax, dword [esp + 0x44]
mov edx, dword [eax + 4]
mov eax, dword [eax]
push edx
push eax
push ecx
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, ebx
call fcn.005b5380
jmp 0x5b531c
lea eax, [esp + 0x28]
mov edx, str.mdat
mov ecx, dword [eax]
mov eax, dword [edx]
cmp ecx, eax
jne 0x5b5236
mov eax, dword [ebx + 0x8c]
xor edx, edx
cmp eax, edx
je 0x5b515f
cmp dword [ebx + 0x64], edx
jne 0x5b515f
mov eax, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x74]
add eax, ebp
push edx
adc ecx, esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
lea edx, [esp + 0x24]
jmp 0x5b5353
mov edi, dword [esp + 0x44]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov ecx, ebp
mov eax, esi
mov esi, dword [esp + 0x20]
sub ecx, edx
sbb eax, esi
xor esi, esi
cmp eax, esi
jg 0x5b518b
jl 0x5b5185
cmp ecx, dword [esp + 0x40]
jae 0x5b518b
mov esi, ebp
sub esi, edx
jmp 0x5b518f
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
mov eax, dword [ebx + 0x100]
lea ecx, [esp + 0x10]
push 0
push ecx
push esi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b5371
mov eax, dword [esp + 0x10]
cmp eax, esi
jne 0x5b5371
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x44]
push 0
push ecx
push eax
mov eax, dword [esp + 0x44]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5b5371
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x10]
cmp eax, ecx
jne 0x5b5371
mov esi, dword [edi]
xor eax, eax
add esi, ecx
mov dword [edi], esi
mov edx, dword [edi + 4]
mov esi, dword [esp + 0x1c]
adc edx, eax
add esi, ecx
mov ecx, dword [esp + 0x20]
mov dword [edi + 4], edx
adc ecx, eax
mov eax, dword [esp + 0x18]
cmp ecx, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ecx
jg 0x5b5318
jl 0x5b5229
mov eax, esi
cmp eax, ebp
jae 0x5b5318
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
jmp 0x5b516b
lea edx, [esp + 0x28]
mov ecx, str.moov
mov eax, dword [edx]
mov edx, dword [ecx]
cmp eax, edx
jne 0x5b533b
mov esi, dword [esp + 0x3c]
mov edx, dword [ebx + 0x100]
lea ecx, [esp + 0x10]
push 0
push ecx
push ebp
push esi
push edx
call edi
test eax, eax
je 0x5b5371
mov eax, dword [esp + 0x10]
cmp eax, ebp
jne 0x5b5371
push eax
call fcn.00622acb
add esp, 4
mov dword [ebx + 0x1c], eax
test eax, eax
je 0x5b5371
mov ecx, dword [esp + 0x10]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 0x8c]
mov dword [ebx + 0x20], ecx
mov ecx, ebx
test eax, eax
je 0x5b5313
call fcn.005b5d70
mov eax, dword [ebx + 0x94]
test eax, eax
je 0x5b5371
mov edx, dword [esp + 0x10]
push edx
call fcn.00622acb
mov ecx, dword [ebx + 0x94]
add esp, 4
mov dword [ecx + 0x1c], eax
mov edx, dword [ebx + 0x94]
mov edi, dword [edx + 0x1c]
test edi, edi
je 0x5b5371
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x3c]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x94]
mov edx, dword [esp + 0x10]
mov dword [ecx + 0x20], edx
mov ecx, dword [ebx + 0x94]
call fcn.005b5d70
mov esi, dword [esp + 0x18]
mov ecx, dword [ebx + 0x70]
pop edi
add ecx, ebp
mov dword [ebx + 0x70], ecx
mov eax, dword [ebx + 0x74]
adc eax, esi
pop esi
mov dword [ebx + 0x74], eax
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret 0x10
mov eax, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x74]
add eax, ebp
push 0
adc ecx, esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
lea edx, [esp + 0x24]
push edx
push eax
mov eax, dword [ebx + 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x5b531c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5b531c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x10