Function at 0x4556b0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.00455670
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dl, byte [esp + 0x30]
mov edi, eax
mov byte [ebp + 0xd], cl
and edi, 0xff
and ecx, 0xff
mov byte [ebp + 0xe], dl
mov dl, byte [esp + 0x38]
imul ecx, edi
mov byte [ebp + 0x10], dl
mov dl, byte [esp + 0x3c]
mov byte [ebp + 0xc], al
mov eax, ecx
mov ebx, dword [esp + 0x34]
mov byte [ebp + 0x11], dl
cdq
and edx, 7
mov byte [ebp + 0xf], bl
add eax, edx
and ebx, 0xff
sar eax, 3
mov dword [esp + 0x3c], eax
mov byte [ebp + 0x12], al
mov eax, dword [esp + 0x30]
mov esi, ebx
and eax, 0xff
imul esi, eax
mov dword [esp + 0x38], eax
mov eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
and edi, 0x80000007
mov dword [esp + 0x18], eax
mov byte [ebp + 0x13], al
jns 0x455742
dec edi
or edi, 0xfffffff8
inc edi
jne 0x455867
mov eax, dword [esp + 0x38]
and eax, 0x80000007
jns 0x455758
dec eax
or eax, 0xfffffff8
inc eax
jne 0x455867
lea edx, [ecx + ecx*2]
mov edi, dword [sym.imp.kernel32.dll_GlobalAlloc]
shl edx, 4
sub edx, ecx
lea eax, [ecx + edx*8]
lea eax, [eax + eax*2]
lea ecx, [ecx + eax*2]
lea eax, [ecx + ecx*4]
cdq
and edx, 7
add eax, edx
mov ebx, eax
sar ebx, 3
push ebx
push 0
call edi
test eax, eax
mov dword [ebp + 4], eax
jne 0x4557a2
mov ecx, ebp
call fcn.00455670
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
mov eax, esi
shl eax, 8
cdq
and edx, 7
add eax, edx
sar eax, 3
push eax
push 0
mov dword [esp + 0x1c], eax
call edi
test eax, eax
mov dword [ebp + 8], eax
jne 0x4557d3
mov ecx, ebp
call fcn.00455670
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
mov ecx, dword [esp + 0x20]
push 0
push 0x80
push 3
push 0
push 1
push DirectSoundCreate
push ecx
call dword [sym.imp.kernel32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x20], esi
jne 0x45580e
mov ecx, ebp
call fcn.00455670
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
mov eax, dword [ebp + 4]
lea edx, [esp + 0x10]
push 0
push edx
push ebx
push eax
push esi
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x455859
cmp dword [esp + 0x10], ebx
jne 0x455859
mov cl, byte [esp + 0x3c]
mov al, byte [esp + 0x28]
mov byte [esp + 0x2c], cl
mov ebx, dword [esp + 0x2c]
and ebx, 0xff
shr al, 3
push ebx
push 0
mov byte [esp + 0x30], al
mov dword [esp + 0x3c], ebx
call edi
test eax, eax
mov dword [esp + 0x38], eax
jne 0x455873
mov ecx, ebp
call fcn.00455670
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
xor edx, edx
mov dword [esp + 0x3c], edx
jmp 0x45587f
mov eax, dword [esp + 0x38]
mov esi, ebx
mov edi, dword [ebp + 4]
imul esi, edx
mov ecx, ebx
add esi, edi
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]
xor edi, edi
test ebx, ebx
jle 0x4558df
mov esi, dword [esp + 0x28]
and esi, 0xff
xor eax, eax
test esi, esi
jle 0x4558d9
lea ecx, [edx + 1]
imul ecx, ebx
mov ebx, dword [ebp + 4]
mov edx, dword [esp + 0x38]
sub ebx, esi
add edx, edi
sub ebx, edi
mov dl, byte [edx + eax]
add ebx, ecx
mov byte [ebx + eax], dl
inc eax
cmp eax, esi
jl 0x4558b7
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x34]
add edi, esi
cmp edi, ebx
jl 0x4558ab
inc edx
cmp edx, 0x2c33
mov dword [esp + 0x3c], edx
jl 0x45587b
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
push eax
call edi
test eax, eax
jne 0x45591b
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.kernel32.dll_GlobalFree]
mov ecx, ebp
call fcn.00455670
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.kernel32.dll_GlobalFree]
mov eax, dword [esp + 0x24]
push 0
push 0x80
push 3
push 0
push 1
push DirectSoundCreate
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x20], esi
jne 0x455961
mov ecx, ebp
call fcn.00455670
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
mov ebx, dword [esp + 0x14]
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x10]
push 0
push ecx
push ebx
push edx
push esi
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x455992
mov ecx, ebp
call fcn.00455670
push esi
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
cmp dword [esp + 0x10], ebx
je 0x4559ae
mov ecx, ebp
call fcn.00455670
push esi
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
mov al, byte [esp + 0x18]
mov byte [esp + 0x2c], al
mov al, byte [esp + 0x30]
mov ebx, dword [esp + 0x2c]
and ebx, 0xff
shr al, 3
push ebx
push 0
mov byte [esp + 0x30], al
mov dword [esp + 0x3c], ebx
call dword [sym.imp.kernel32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x38], eax
jne 0x4559f6
mov ecx, ebp
call fcn.00455670
push esi
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
mov dword [esp + 0x3c], 0
mov esi, ebx
mov edi, dword [ebp + 8]
imul esi, dword [esp + 0x3c]
mov ecx, ebx
add esi, edi
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
mov dword [esp + 0x30], edx
test ebx, ebx
rep movsb byte es:[edi], byte [esi]
jle 0x455a78
mov esi, dword [esp + 0x28]
and esi, 0xff
xor eax, eax
test esi, esi
jle 0x455a6a
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
inc ecx
imul ecx, ebx
add edi, edx
mov dword [esp + 0x2c], edi
mov ebx, dword [esp + 0x2c]
mov edi, ecx
sub edi, esi
mov bl, byte [ebx + eax]
sub edi, edx
mov edx, dword [ebp + 8]
add edi, eax
inc eax
mov byte [edi + edx], bl
mov edx, dword [esp + 0x30]
cmp eax, esi
jl 0x455a48
mov ebx, dword [esp + 0x34]
add edx, esi
cmp edx, ebx
mov dword [esp + 0x30], edx
jl 0x455a30
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
inc ecx
cmp ecx, 0x100
mov dword [esp + 0x3c], ecx
jl 0x4559fe
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
jne 0x455aba
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.kernel32.dll_GlobalFree]
mov ecx, ebp
call fcn.00455670
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x20
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.kernel32.dll_GlobalFree]
pop edi
mov dword [ebp], 1
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc
ret 0x20