Function at 0x4be7b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1258
call fcn.00526b50
mov eax, dword [ebp + 0x14]
push ebx
push esi
xor esi, esi
test eax, eax
push edi
jne 0x4be7e0
mov ecx, dword [0x75e428]
test ecx, ecx
jne 0x4be7e0
mov dword [0x75e428], 1
cmp byte [eax], 0
je 0x4be810
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x4be7ef
mov byte [eax], 1
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4beec1
mov dword [eax], 0
mov dword [eax + 4], 0x40590000
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
test eax, eax
je 0x4be825
mov ebx, dword [eax + 0x14]
mov esi, dword [eax + 0x2b8]
mov dword [ebp + 0x10], ebx
jmp 0x4be828
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x4be838
cmp byte [eax], 0
je 0x4be8f5
xor eax, eax
push eax
mov dword [0x75e448], eax
mov dword [0x75e444], eax
mov dword [0x75e440], eax
mov dword [0x75e438], eax
mov dword [0x75e43c], eax
mov dword [0x75e430], eax
mov dword [0x75e434], eax
mov byte [0x75e44c], al
call fcn.004be740
mov ecx, 0x5a
xor eax, eax
mov edi, 0x75e2c0
add esp, 4
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x1c]
test al, al
je 0x4be88a
mov dword [0x75e424], 9
mov eax, dword [ebp + 8]
test eax, eax
je 0x4be96a
mov eax, dword [ebp + 0xc]
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*2]
lea eax, [eax + edx*4]
shl eax, 5
add esi, eax
mov ecx, dword [esi + 0x54]
mov edx, dword [esi + 0x50]
push ecx
push edx
push ebx
call fcn.004df820
add esp, 0xc
test eax, eax
jne 0x4be8c4
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x40]
mov byte [0x75e44c], 1
lea eax, [ecx + ecx*2]
shl eax, 4
add eax, ecx
lea eax, [eax + eax*2]
shl eax, 4
cdq
mov esi, eax
mov dword [0x75e434], edx
mov dword [0x75e430], esi
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x4be901
mov byte [eax], 0
mov edx, dword [0x75e434]
mov esi, dword [0x75e430]
cmp dword [0x75e43c], edx
jg 0x4bed39
jl 0x4be91b
cmp dword [0x75e438], esi
jae 0x4bed3f
mov ebx, dword [0x75e43c]
mov ecx, 0x244
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [0x75e44c]
mov dword [esp + 0xc], 0
test al, al
jne 0x4be9e7
sub esi, dword [0x75e438]
sbb edx, ebx
mov dword [esp + 0x1c], edx
js 0x4be9ba
jg 0x4be963
cmp esi, 0x914
jbe 0x4be9ba
mov ebx, 0x914
jmp 0x4be9bc
push 0
push 0
push ebx
call fcn.004df820
add esp, 0xc
test eax, eax
jne 0x4be984
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call fcn.004df870
add esp, 4
mov esi, eax
test edx, edx
mov dword [0x75e430], esi
mov dword [0x75e434], edx
jg 0x4be8eb
jl 0x4be9b1
cmp esi, 0x914
jae 0x4be8eb
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, esi
mov edx, dword [ebp + 0x10]
lea eax, [esp + 0xc]
push 0
push eax
lea ecx, [esp + 0x28]
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4bee2b
cmp dword [esp + 0xc], ebx
jne 0x4bee2b
jmp 0x4bea4d
mov ecx, 0x24b
xor eax, eax
lea edi, [esp + 0x935]
mov byte [esp + 0x934], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, dword [ebp + 0x10]
push 0
stosb byte es:[edi], al
lea eax, [esp + 0x10]
lea ecx, [esp + 0x938]
push eax
push 0x930
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4bee2b
cmp dword [esp + 0xc], 0x930
jne 0x4bee2b
mov ecx, 0x245
lea esi, [esp + 0x94c]
lea edi, [esp + 0x20]
mov ebx, 0x914
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x75e438]
mov ecx, dword [0x75e43c]
or eax, ecx
jne 0x4bead3
mov al, byte [0x75e44c]
test al, al
jne 0x4bead3
lea edx, [esp + 0x20]
mov ecx, str.RIFF
mov eax, dword [edx]
mov edx, dword [ecx]
cmp eax, edx
jne 0x4bead3
mov ecx, 2
mov edi, str.CDXAfmt
lea esi, [esp + 0x28]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x4bead3
lea ecx, [esp + 0x44]
mov eax, str.data
mov edx, dword [ecx]
mov ecx, dword [eax]
cmp edx, ecx
jne 0x4bead3
mov eax, dword [ebp + 0x10]
push 0
push 0x2c
push eax
mov byte [0x75e44c], 1
mov dword [0x75e438], 0x2c
mov dword [0x75e43c], 0
call fcn.004df820
add esp, 0xc
test eax, eax
je 0x4bee2b
jmp 0x4bec96
push 0x75e2c0
push 1
lea ecx, [esp + 0x28]
push ebx
push ecx
call fcn.004be250
mov edi, eax
xor ecx, ecx
add esp, 0x10
cmp edi, ecx
je 0x4bed97
mov al, byte [0x75e44c]
test al, al
je 0x4beb5a
mov al, byte [0x75e2cc]
test al, al
je 0x4beb3d
cmp dword [0x75e308], 1
jne 0x4beb20
mov eax, dword [ebp + 0x14]
mov dword [0x75e308], ecx
inc dword [eax + 0x138]
jmp 0x4beb5a
mov eax, dword [ebp + 0x14]
mov edx, dword [eax + 0x13c]
inc edx
mov dword [eax + 0x13c], edx
mov eax, dword [0x75e308]
dec eax
mov dword [0x75e308], eax
jmp 0x4beb5a
mov eax, dword [ebp + 0x14]
mov esi, dword [0x75e308]
mov edx, dword [eax + 0x13c]
add esi, edx
mov dword [0x75e308], esi
mov dword [eax + 0x13c], ecx
mov eax, dword [0x75e2d4]
cmp eax, 4
ja case.default.0x4beb68
jmp dword [eax*4 + 0x4beecc]
mov al, byte [ebp + 0x18]
test al, al
jne case.0x4beb68.0
push 0x10
call fcn.004df760
mov esi, eax
add esp, 4
test esi, esi
je 0x4bedd7
mov eax, dword [0x75e440]
mov dword [esi], eax
mov ecx, dword [0x75e2d8]
mov edx, dword [0x75e2dc]
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
mov eax, dword [0x75e2e0]
lea ecx, [eax*8]
sub ecx, eax
mov ecx, dword [ecx*8 + 0x75e344]
test ecx, ecx
jne 0x4bec0c
push 0x10
call fcn.00548c73
add esp, 4
test eax, eax
je 0x4bebd7
mov ecx, eax
call fcn.004dfef0
jmp 0x4bebd9
xor eax, eax
mov ecx, dword [0x75e2e0]
lea edx, [ecx*8]
sub edx, ecx
mov dword [edx*8 + 0x75e344], eax
mov eax, dword [0x75e2e0]
lea ecx, [eax*8]
sub ecx, eax
mov ecx, dword [ecx*8 + 0x75e344]
test ecx, ecx
je 0x4bedd7
push esi
call fcn.004dff60
mov al, byte [0x75e44c]
mov edx, dword [0x75e438]
test al, al
je 0x4bec29
add edx, 0x930
jmp 0x4bec2b
add edx, edi
mov ecx, dword [0x75e43c]
mov dword [0x75e438], edx
mov edx, dword [0x75e440]
adc ecx, 0
inc edx
cmp edi, ebx
mov dword [0x75e43c], ecx
mov dword [0x75e440], edx
je 0x4bec96
test al, al
jne 0x4bec96
mov ecx, dword [0x75e444]
mov eax, dword [0x75e448]
mov edx, 0x914
sub edx, edi
add ecx, edx
mov edx, dword [ebp + 0x10]
inc eax
mov dword [0x75e444], ecx
mov ecx, dword [0x75e438]
mov dword [0x75e448], eax
mov eax, dword [0x75e43c]
push eax
push ecx
push edx
call fcn.004df820
add esp, 0xc
test eax, eax
je 0x4bee2b
mov esi, dword [ebp + 0x24]
test esi, esi
je 0x4becd6
mov eax, dword [0x75e43c]
mov ecx, dword [0x75e438]
push 0
push 0x64
push eax
push ecx
call fcn.00526dd0
mov ecx, dword [0x75e434]
push ecx
mov ecx, dword [0x75e430]
push ecx
push edx
push eax
call fcn.00526d20
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
fild qword [esp + 0x10]
fstp qword [esi]
mov ecx, dword [ebp + 0x28]
test ecx, ecx
je 0x4bed06
mov edx, dword [0x75e438]
mov eax, dword [0x75e430]
cmp edx, eax
jne 0x4bed02
mov eax, dword [0x75e43c]
mov edx, dword [0x75e434]
cmp eax, edx
jne 0x4bed02
mov eax, 1
jmp 0x4bed04
xor eax, eax
mov byte [ecx], al
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x4bedea
mov edx, dword [0x75e434]
mov ebx, dword [0x75e43c]
mov esi, dword [0x75e430]
cmp ebx, edx
jl 0x4be921
jg 0x4bed39
cmp dword [0x75e438], esi
jb 0x4be921
cmp dword [0x75e438], esi
jne 0x4bed49
cmp dword [0x75e43c], edx
je 0x4bed5c
mov eax, dword [0x75e428]
test eax, eax
jne 0x4bed5c
mov dword [0x75e428], 1
mov ebx, dword [ebp + 0x14]
mov ecx, 0x48
mov esi, 0x75e308
push 1
lea edi, [ebx + 0x18]
rep movsd dword es:[edi], dword [esi]
call fcn.004be740
mov ecx, dword [ebp + 8]
add esp, 4
test ecx, ecx
mov byte [ebx], 1
mov eax, 3
je 0x4bee34
mov dword [ebx + 4], 1
jmp 0x4bee4a
mov esi, dword [0x75e430]
mov ebx, dword [0x75e438]
mov edx, dword [0x75e434]
mov edi, dword [0x75e43c]
mov eax, esi
mov ecx, edx
sub eax, ebx
sbb ecx, edi
mov dword [esp + 0x1c], ecx
js 0x4bed39
jg 0x4bedce
cmp eax, 0x914
jbe 0x4bed39
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [0x75e428], 0x99
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x75e438]
mov eax, dword [0x75e430]
cmp edx, eax
jne 0x4beec1
mov eax, dword [0x75e43c]
mov ecx, dword [0x75e434]
cmp eax, ecx
je 0x4bed5c
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x75e428], ecx
jne 0x4bee2b
mov dword [0x75e428], 2
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [0x75e44c]
test cl, cl
je 0x4bee43
mov dword [ebx + 4], eax
jmp 0x4bee4a
mov dword [ebx + 4], 2
mov ebx, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
fld qword [ebx + 0x120]
fsub qword [ebx + 0x118]
add ebx, 0x54
fstp qword [ebx + 0xd4]
mov ecx, dword [ebx]
test ecx, ecx
je 0x4bee95
call fcn.004dffe0
mov edi, eax
xor esi, esi
test edi, edi
jle 0x4bee95
mov ecx, dword [ebx]
push esi
call fcn.004dffa0
mov ecx, dword [ebp + 0x14]
inc esi
fld qword [eax + 8]
fsub qword [ecx + 0x118]
cmp esi, edi
fstp qword [eax + 8]
jl 0x4bee79
mov eax, dword [esp + 0xc]
add ebx, 0x38
dec eax
mov dword [esp + 0xc], eax
jne 0x4bee66
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4beeb7
mov dword [eax], 0
mov dword [eax + 4], 0x40590000
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x4beec1
mov byte [eax], 1
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret