Function at 0x479f70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0x1c
mov edx, str.read
push ebx
push esi
push edi
mov edi, ecx
mov ecx, eax
mov bl, byte [ecx]
cmp bl, byte [edx]
jne 0x479fa8
test bl, bl
je 0x479fa4
mov bl, byte [ecx + 1]
cmp bl, byte [edx + 1]
jne 0x479fa8
add ecx, 2
add edx, 2
test bl, bl
jne 0x479f88
xor ecx, ecx
jmp 0x479fad
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x47a058
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov esi, dword [edi + 0x60]
cdq
cmp dword [edi + 0x64], edx
jg 0x479fc9
jl 0x479fcb
cmp esi, eax
jb 0x479fcb
mov esi, ecx
test esi, esi
jne 0x479fda
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [edi + 4]
push dword [edi + 0x400d4]
push dword [edi + 0x400d0]
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
call eax
test al, al
jne 0x47a00c
sub esp, 8
mov ecx, edi
call fcn.0047b400
mov eax, 0xfffffff6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 0x58]
push esi
push dword [ebp + 0xc]
push dword [eax + 8]
call fcn.004a2cc3
mov ecx, eax
add esp, 0xc
test ecx, ecx
jns 0x47a036
cmp dword [0xecedb0], 0
je 0x47a277
jmp 0x47a2b8
jle 0x47a04d
mov eax, ecx
cdq
sub dword [edi + 0x60], eax
sbb dword [edi + 0x64], edx
add dword [edi + 0x400d0], eax
adc dword [edi + 0x400d4], edx
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, str.write
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x47a080
test dl, dl
je 0x47a07c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x47a080
add eax, 2
add ecx, 2
test dl, dl
jne 0x47a060
xor eax, eax
jmp 0x47a085
sbb eax, eax
or eax, 1
test eax, eax
jne 0x47a269
mov ecx, dword [ebp + 0x10]
mov eax, dword [edi + 0x6c]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], ecx
cmp eax, dword [edi + 0x74]
jg 0x47a25b
test ecx, ecx
jle 0x47a226
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x14], esi
nop dword [eax]
nop word [eax + eax]
cmp dword [edi + 0x400b4], 0
mov ebx, dword [edi + 0x400b0]
jg 0x47a0d5
jl 0x47a0d7
cmp ebx, ecx
jb 0x47a0d7
mov ebx, ecx
mov eax, dword [edi]
cmp dword [eax + 0x40068], 0
je 0x479ffe
push dword [edi + 0x400d8]
mov edx, ebx
mov ecx, esi
call fcn.0045efd0
add esp, 4
mov dword [edi + 0x400d8], eax
cmp dword [edi + 0x70], 0
je 0x47a127
mov eax, dword [edi]
cmp byte [eax], 0x74
je 0x47a127
test ebx, ebx
je 0x47a127
push ebx
push esi
push dword [edi + 0x80]
call fcn.004a3c00
add esp, 0xc
cmp eax, ebx
jne 0x47a233
mov eax, ebx
cdq
mov ecx, eax
mov dword [esp + 0x1c], eax
add ecx, dword [edi + 0x400b8]
mov eax, dword [edi]
mov dword [esp + 0x20], edx
adc edx, dword [edi + 0x400bc]
mov dword [edi + 0x400b8], ecx
mov dword [edi + 0x400bc], edx
cmp dword [eax + 0x40068], 0
je 0x479ffe
call fcn.00489490
mov edx, dword [edi + 0x400c4]
mov ecx, dword [edi + 0x400c0]
cvtsd2ss xmm0, xmm0
movss dword [esp + 0x10], xmm0
call fcn.00489430
movss xmm1, dword [esp + 0x10]
cvtsd2ss xmm0, xmm0
mov esi, dword [edi + 0x400c8]
push 0xffffffffffffffff
push dword [esi + 0x41c]
divss xmm1, xmm0
movss dword [esp + 0x18], xmm1
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
movss xmm0, dword [esp + 0x10]
push dword [esi + 0x41c]
movss dword [esi + 0x418], xmm0
call dword [sym.imp.KERNEL32.DLL_ReleaseMutex]
mov eax, dword [esp + 0x1c]
sub dword [edi + 0x400b0], eax
mov eax, dword [esp + 0x20]
sbb dword [edi + 0x400b4], eax
mov eax, dword [edi + 0x400b0]
or eax, dword [edi + 0x400b4]
jne 0x47a20a
mov ecx, edi
call fcn.00479db0
test al, al
je 0x479ffe
inc dword [edi + 0x6c]
mov eax, dword [edi + 0x6c]
cmp eax, dword [edi + 0x74]
jg 0x47a25b
push 1
mov ecx, edi
call fcn.00479a10
test al, al
je 0x479ffe
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
sub ecx, ebx
add esi, ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], esi
test ecx, ecx
jg 0x47a0c0
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [0xecedb0], 0
jne 0x47a2b8
mov ecx, 0x40000
call fcn.00477d00
mov ecx, 0x40000
mov edi, eax
call fcn.00477d00
mov esi, eax
push str.ERROR:_file_write_operation_failed
jmp 0x47a294
mov eax, 0xfffffff7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
pop esi
mov eax, 0xfffffff8
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, 0x40000
call fcn.00477d00
mov ecx, 0x40000
mov edi, eax
call fcn.00477d00
mov esi, eax
push str.ERROR:_file_read_operation_failed
push edi
call fcn.0042e890
mov edx, esi
mov ecx, edi
call fcn.0045cec0
push esi
push 0xea0114
call fcn.00437320
add esp, 0x10
push 2
call fcn.00497ee7
push 1
push 0xeced70
call fcn.0048a9ab
int3