Function at 0x477d90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1258
call fcn.004b7240
mov eax, dword [ebp + 0x14]
push ebx
xor ecx, ecx
xor ebx, ebx
push esi
cmp eax, ecx
push edi
jne 0x477dc0
cmp dword [0x58d448], ecx
jne 0x477dc0
mov dword [0x58d448], 1
cmp byte [eax], 0
je 0x477dec
mov eax, dword [ebp + 0x28]
cmp eax, ecx
je 0x477dcf
mov byte [eax], 1
mov eax, dword [ebp + 0x24]
cmp eax, ecx
je 0x4784a1
mov dword [eax], ecx
mov dword [eax + 4], 0x40590000
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
cmp esi, ecx
je 0x477dff
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0xcc]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x20]
cmp eax, ecx
je 0x477e0f
cmp byte [eax], 0
je 0x477ed1
push ecx
mov dword [0x58d468], ecx
mov dword [0x58d464], ecx
mov dword [0x58d460], ecx
mov dword [0x58d458], ecx
mov dword [0x58d45c], ecx
mov dword [0x58d450], ecx
mov dword [0x58d454], ecx
mov byte [0x58d46c], 0
call fcn.00477d20
mov ecx, 0x5a
xor eax, eax
mov edi, 0x58d2e0
add esp, 4
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x1c]
test al, al
je 0x477e68
mov dword [0x58d444], 9
test esi, esi
je 0x477f47
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebx + esi*8 + 0xe9c]
mov edx, dword [ebx + esi*8 + 0xe98]
push ecx
push edx
push eax
call fcn.00487f10
add esp, 0xc
test eax, eax
jne 0x477e9c
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + esi*4 + 0x9e4]
mov byte [0x58d46c], 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 [0x58d454], edx
mov dword [0x58d450], esi
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x477edd
mov byte [eax], 0
mov edx, dword [0x58d454]
mov esi, dword [0x58d450]
cmp dword [0x58d45c], edx
jg 0x47831b
jl 0x477ef7
cmp dword [0x58d458], esi
jae 0x47831b
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 [0x58d46c]
mov dword [esp + 0xc], 0
test al, al
jne 0x477fca
mov ecx, dword [0x58d458]
mov eax, dword [0x58d45c]
sub esi, ecx
sbb edx, eax
mov dword [esp + 0x1c], edx
js 0x477f9d
jg 0x477f40
cmp esi, 0x914
jbe 0x477f9d
mov ebx, 0x914
jmp 0x477f9f
mov ecx, dword [ebp + 0x10]
push 0
push 0
push ecx
call fcn.00487f10
add esp, 0xc
test eax, eax
jne 0x477f64
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
push edx
call fcn.00488190
add esp, 4
mov esi, eax
test edx, edx
mov dword [0x58d450], esi
mov dword [0x58d454], edx
jg 0x477ec7
jl 0x477f94
cmp esi, 0x914
jae 0x477ec7
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 0x4783d7
cmp dword [esp + 0xc], ebx
jne 0x4783d7
jmp 0x478030
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 0x4783d7
cmp dword [esp + 0xc], 0x930
jne 0x4783d7
mov ecx, 0x245
lea esi, [esp + 0x94c]
lea edi, [esp + 0x20]
mov ebx, 0x914
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x58d458]
mov ecx, dword [0x58d45c]
or eax, ecx
jne 0x4780b6
mov al, byte [0x58d46c]
test al, al
jne 0x4780b6
lea edx, [esp + 0x20]
mov ecx, str.RIFF
mov eax, dword [edx]
mov edx, dword [ecx]
cmp eax, edx
jne 0x4780b6
mov ecx, 2
mov edi, str.CDXAfmt
lea esi, [esp + 0x28]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x4780b6
lea ecx, [esp + 0x44]
mov eax, str.data
mov edx, dword [ecx]
mov ecx, dword [eax]
cmp edx, ecx
jne 0x4780b6
mov eax, dword [ebp + 0x10]
push 0
push 0x2c
push eax
mov byte [0x58d46c], 1
mov dword [0x58d458], 0x2c
mov dword [0x58d45c], 0
call fcn.00487f10
add esp, 0xc
test eax, eax
je 0x4783d7
jmp 0x478279
push 0x58d2e0
push 1
lea ecx, [esp + 0x28]
push ebx
push ecx
call fcn.00477830
mov edi, eax
xor ecx, ecx
add esp, 0x10
cmp edi, ecx
je 0x47834f
mov al, byte [0x58d46c]
test al, al
je 0x47813d
mov al, byte [0x58d2ec]
test al, al
je 0x478120
cmp dword [0x58d328], 1
jne 0x478103
mov eax, dword [ebp + 0x14]
mov dword [0x58d328], ecx
inc dword [eax + 0x138]
jmp 0x47813d
mov eax, dword [ebp + 0x14]
mov edx, dword [eax + 0x13c]
inc edx
mov dword [eax + 0x13c], edx
mov eax, dword [0x58d328]
dec eax
mov dword [0x58d328], eax
jmp 0x47813d
mov eax, dword [ebp + 0x14]
mov esi, dword [0x58d328]
mov edx, dword [eax + 0x13c]
add esi, edx
mov dword [0x58d328], esi
mov dword [eax + 0x13c], ecx
mov eax, dword [0x58d2f4]
cmp eax, 4
ja case.default.0x47814b
jmp dword [eax*4 + 0x4784ac]
mov al, byte [ebp + 0x18]
test al, al
jne case.0x47814b.0
push 0x10
call fcn.00487e60
mov esi, eax
add esp, 4
test esi, esi
je 0x478387
mov eax, dword [0x58d460]
mov dword [esi], eax
mov ecx, dword [0x58d2f8]
mov edx, dword [0x58d2fc]
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
mov eax, dword [0x58d300]
lea ecx, [eax*8]
sub ecx, eax
mov ecx, dword [ecx*8 + 0x58d364]
test ecx, ecx
jne 0x4781ef
push 0x14
call fcn.004d2c41
add esp, 4
test eax, eax
je 0x4781ba
mov ecx, eax
call fcn.00488320
jmp 0x4781bc
xor eax, eax
mov ecx, dword [0x58d300]
lea edx, [ecx*8]
sub edx, ecx
mov dword [edx*8 + 0x58d364], eax
mov eax, dword [0x58d300]
lea ecx, [eax*8]
sub ecx, eax
mov ecx, dword [ecx*8 + 0x58d364]
test ecx, ecx
je 0x478387
push esi
call fcn.00488380
mov al, byte [0x58d46c]
mov edx, dword [0x58d458]
test al, al
je 0x47820c
add edx, 0x930
jmp 0x47820e
add edx, edi
mov ecx, dword [0x58d45c]
mov dword [0x58d458], edx
mov edx, dword [0x58d460]
adc ecx, 0
inc edx
cmp edi, ebx
mov dword [0x58d45c], ecx
mov dword [0x58d460], edx
je 0x478279
test al, al
jne 0x478279
mov ecx, dword [0x58d464]
mov eax, dword [0x58d468]
mov edx, 0x914
sub edx, edi
add ecx, edx
mov edx, dword [ebp + 0x10]
inc eax
mov dword [0x58d464], ecx
mov ecx, dword [0x58d458]
mov dword [0x58d468], eax
mov eax, dword [0x58d45c]
push eax
push ecx
push edx
call fcn.00487f10
add esp, 0xc
test eax, eax
je 0x4783d7
mov esi, dword [ebp + 0x24]
test esi, esi
je 0x4782b9
mov eax, dword [0x58d45c]
mov ecx, dword [0x58d458]
push 0
push 0x64
push eax
push ecx
call fcn.004b74a0
mov ecx, dword [0x58d454]
push ecx
mov ecx, dword [0x58d450]
push ecx
push edx
push eax
call fcn.004b73f0
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 0x4782e9
mov edx, dword [0x58d458]
mov eax, dword [0x58d450]
cmp edx, eax
jne 0x4782e5
mov eax, dword [0x58d45c]
mov edx, dword [0x58d454]
cmp eax, edx
jne 0x4782e5
mov eax, 1
jmp 0x4782e7
xor eax, eax
mov byte [ecx], al
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x47839a
mov edx, dword [0x58d454]
mov eax, dword [0x58d45c]
mov esi, dword [0x58d450]
cmp eax, edx
jl 0x477ef7
jg 0x47831b
cmp dword [0x58d458], esi
jb 0x477ef7
mov eax, dword [0x58d458]
mov ebx, dword [ebp + 0x14]
cmp eax, esi
jne 0x478333
cmp dword [0x58d45c], edx
je 0x4783e3
mov eax, dword [0x58d448]
test eax, eax
jne 0x4783e3
mov dword [0x58d448], 1
jmp 0x4783e3
mov esi, dword [0x58d450]
mov ebx, dword [0x58d458]
mov edx, dword [0x58d454]
mov edi, dword [0x58d45c]
mov eax, esi
mov ecx, edx
sub eax, ebx
sbb ecx, edi
mov dword [esp + 0x1c], ecx
js 0x47831b
jg 0x47837e
cmp eax, 0x914
jbe 0x47831b
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [0x58d448], 0x99
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x58d458]
mov eax, dword [0x58d450]
cmp edx, eax
jne 0x4784a1
mov eax, dword [0x58d45c]
mov ecx, dword [0x58d454]
cmp eax, ecx
je 0x4783e0
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x58d448], ecx
jne 0x4783d7
mov dword [0x58d448], 2
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
lea edi, [ebx + 0x18]
mov ecx, 0x48
mov esi, 0x58d328
push 1
rep movsd dword es:[edi], dword [esi]
call fcn.00477d20
mov ecx, dword [ebp + 8]
add esp, 4
test ecx, ecx
mov byte [ebx], 1
mov eax, 3
je 0x478414
mov dword [ebx + 4], 1
jmp 0x47842a
mov cl, byte [0x58d46c]
test cl, cl
je 0x478423
mov dword [ebx + 4], eax
jmp 0x47842a
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 0x478475
call fcn.00488400
mov edi, eax
xor esi, esi
test edi, edi
jle 0x478475
mov ecx, dword [ebx]
push esi
call fcn.004883c0
mov ecx, dword [ebp + 0x14]
inc esi
fld qword [eax + 8]
fsub qword [ecx + 0x118]
cmp esi, edi
fstp qword [eax + 8]
jl 0x478459
mov eax, dword [esp + 0xc]
add ebx, 0x38
dec eax
mov dword [esp + 0xc], eax
jne 0x478446
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x478497
mov dword [eax], 0
mov dword [eax + 4], 0x40590000
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x4784a1
mov byte [eax], 1
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret