Function at 0x4531d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
push edi
push 0x14e8
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, dword [ebp + 8]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
mov dword [edi], esi
je 0x453a6e
mov al, byte [ebp + 0x14]
test al, 1
mov dword [esi + 0x4d0], ebx
mov dword [esi + 0x4d4], 0xbff00000
mov dword [esi + 0x110], ebx
jne 0x453442
test al, 4
mov eax, dword [ebp + 0x10]
je 0x45327b
mov dword [esi + 0x110], eax
push 0x2c
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ebx
lea edx, [esp + 0x14]
push edx
mov edi, eax
mov eax, dword [esi + 0x110]
push 0x2c
push edi
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4532b8
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call edi
mov ecx, dword [esi + 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 8]
mov edx, dword [esi]
push edx
call edi
mov dword [esi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [eax], bl
je 0x453a6e
push ebx
push 0x80
push 3
push ebx
push ebx
push DirectSoundCreate
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x110], eax
jne 0x453228
mov ecx, dword [edi]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push esi
mov dword [edi + 4], 0x2c
call fcn.00453010
add esp, 8
test eax, eax
jne 0x4532f6
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call edi
mov eax, dword [esi + 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp + 8]
mov ecx, dword [esi]
push ecx
call edi
mov dword [esi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x124], ebx
je 0x4533e9
mov edx, dword [esi + 0x110]
push 1
push ebx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esi + 0x114], eax
jne 0x453347
mov eax, dword [esi + 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call esi
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
push ecx
call esi
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x1d4], ebx
je 0x4533dd
mov edx, dword [esi + 0x4b8]
mov eax, dword [esi + 0x110]
push 1
push ebx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi + 0x110]
push ebx
lea ecx, [esp + 0x14]
push ecx
push 8
push edi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4533ad
mov eax, dword [esi + 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call esi
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
push ecx
call esi
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebx
fild qword [esp + 0x14]
push ebx
push ebx
fmul qword [0x47b510]
fstp qword [esi + 0x4d0]
mov eax, dword [esi + 0x114]
mov ecx, dword [esi + 0x110]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edi, dword [ebp + 8]
jmp 0x453467
mov edx, dword [esi + 0x110]
push 2
push ebx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
mov dword [esi + 0x4b8], eax
mov eax, dword [esi + 0x110]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esi + 0x4b8], 0xffffffff
jne 0x4533dd
mov ecx, dword [esi + 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call esi
mov edi, dword [ebp + 8]
mov edx, dword [edi]
push edx
call esi
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
push eax
push esi
call fcn.00453010
add esp, 8
test eax, eax
jne 0x453467
mov ecx, dword [edi]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [esi], 1
mov edx, dword [esi + 0x114]
mov dword [esi + 0x118], edx
cmp dword [esi + 0x1d4], ebx
je 0x4534d7
cmp dword [esi + 0x124], ebx
je 0x4534d7
mov eax, dword [esi + 0x114]
mov edx, dword [esi + 0x4b8]
add edx, eax
mov dword [esi + 0x4b8], edx
cmp dword [esi + 0x4d0], ebx
mov eax, edx
jne 0x4534d7
cmp dword [esi + 0x4d4], 0xbff00000
jne 0x4534d7
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebx
fild qword [esp + 0x14]
fmul qword [0x47b510]
fstp qword [esi + 0x4d0]
lea ecx, [esi + 0x144]
lea eax, [esi + 0x178]
mov edx, 2
mov dword [eax + 0x10], ebx
mov dword [eax + 0x14], ebx
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax - 0x10], ebx
mov dword [eax - 0xc], ebx
mov dword [eax - 0x20], ebx
mov dword [eax - 0x1c], ebx
mov dword [ecx + 8], ebx
mov dword [ecx], ebx
mov dword [ecx - 8], ebx
mov dword [ecx - 0x10], ebx
add eax, 8
add ecx, 4
dec edx
jne 0x4534e8
mov edx, dword [esi + 0x100]
mov dword [esi + 0xd4], 0x64
mov dword [esi + 0xec], 1
cmp dword [esi + 0x124], ebx
mov dword [esi + 0x198], ebx
mov dword [esi + 0x19c], ebx
mov dword [esi + 0x1a0], edx
mov dword [esi + 0x1a8], ebx
mov dword [esi + 0x1ac], ebx
mov dword [esi + 0x1b0], ebx
mov dword [esi + 0x1b4], ebx
mov dword [esi + 0x1b8], ebx
mov dword [esi + 0x1bc], ebx
mov dword [esi + 0x1c4], ebx
mov dword [esi + 0xf0], ebx
mov dword [esi + 0x30], ebx
mov dword [esi + 0x4e0], ebx
je 0x4535b7
xor ecx, ecx
mov cx, word [esi + 0x108]
mov eax, ecx
imul eax, edx
imul eax, dword [0x4a15dc]
xor edx, edx
mov dword [esi + 0x24], eax
div dword [0x4a15d8]
xor edx, edx
mov edi, eax
div ecx
mov dword [esi + 0x24], edi
cmp edx, ebx
je 0x4535b4
sub ecx, edx
add ecx, edi
mov dword [esi + 0x24], ecx
mov edi, dword [ebp + 8]
mov eax, dword [esi + 0x124]
mov dword [esi + 0x4dc], eax
cmp dword [esi + 0x1d4], ebx
je 0x453954
sub esp, 0x10
mov edx, esp
mov eax, 0x454610
mov dword [edx], eax
mov ecx, 0x4546e0
mov dword [edx + 4], ecx
mov eax, fcn.00421370
mov dword [edx + 8], eax
mov dword [esi + 0x4c0], ebx
mov eax, 0x454760
mov dword [edx + 0xc], eax
mov dword [esi + 0x4c4], ebx
mov eax, dword [edi]
push ebx
push ebx
add eax, 0x1e0
push eax
push edi
call fcn.00476d90
add esp, 0x20
test eax, eax
jge 0x45362a
mov ecx, dword [edi]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
add edx, 0x1e0
push 0xffffffffffffffff
push edx
call fcn.00478fc0
add esp, 8
cmp eax, ebx
mov dword [esi + 0x4b0], eax
je 0x453925
cmp dword [esi + 0x124], ebx
jne 0x45390d
lea eax, [esi + 0x1e0]
push 0xffffffffffffffff
push eax
call fcn.00479000
mov edi, dword [eax]
mov ecx, dword [esi + 0x4b0]
mov eax, dword [ecx + 4]
shl eax, 4
cdq
and edx, 7
add eax, edx
sar eax, 3
mov word [esi + 0x108], ax
lea eax, [esi + 0x1e0]
push 0xffffffffffffffff
push eax
call fcn.00477cc0
xor edx, edx
mov dx, word [esi + 0x108]
add esp, 0x10
mov dword [esp + 0x10], ebx
imul eax, edx
mov dword [esi + 0x4dc], eax
mov eax, dword [edi]
cmp eax, ebx
je 0x45386a
push str.LoopStart
push eax
call fcn.00445110
add esp, 8
cmp eax, ebx
je 0x4536eb
add eax, 0xa
push eax
call fcn.0044f4bc
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
add esp, 4
fmul qword [0x47b510]
fstp qword [esi + 0x4d0]
jmp 0x45385c
mov eax, dword [edi]
push str.LOOPSTART
push eax
call fcn.00445110
add esp, 8
cmp eax, ebx
je 0x453734
add eax, 0xa
push eax
call fcn.0044f4bc
push ebx
push eax
mov dword [esp + 0x1c], eax
lea eax, [esi + 0x1e0]
push eax
call fcn.00478750
lea eax, [esi + 0x1e0]
push eax
call fcn.00478ee0
fstp qword [esi + 0x4d0]
add esp, 0x14
jmp 0x45385c
mov ecx, dword [edi]
push str.LoopEnd
push ecx
call fcn.00445110
add esp, 8
cmp eax, ebx
je 0x453795
add eax, 8
push eax
call fcn.0044f4bc
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
push ecx
lea eax, [esi + 0x1e0]
fmul qword [0x47b510]
fstp qword [esp]
push eax
call fcn.00478dd0
lea eax, [esi + 0x1e0]
push eax
call fcn.00478ec0
xor edx, edx
mov dx, word [esi + 0x108]
add esp, 0x10
imul eax, edx
mov dword [esi + 0x4dc], eax
jmp 0x45385c
mov eax, dword [edi]
push str.LOOPEND
push eax
call fcn.00445110
add esp, 8
cmp eax, ebx
je 0x4537e4
add eax, 8
push eax
call fcn.0044f4bc
cdq
push edx
push eax
lea eax, [esi + 0x1e0]
push eax
call fcn.00478750
lea eax, [esi + 0x1e0]
push eax
call fcn.00478ec0
xor ecx, ecx
mov cx, word [esi + 0x108]
add esp, 0x14
imul eax, ecx
mov dword [esi + 0x4dc], eax
jmp 0x45385c
mov edx, dword [edi]
push str.LOOPLENGTH
push edx
call fcn.00445110
add esp, 8
cmp eax, ebx
je 0x453836
add eax, 0xb
push eax
call fcn.0044f4bc
add eax, dword [esp + 0x14]
push ebx
push eax
lea eax, [esi + 0x1e0]
push eax
call fcn.00478750
lea eax, [esi + 0x1e0]
push eax
call fcn.00478ec0
xor ecx, ecx
mov cx, word [esi + 0x108]
add esp, 0x14
imul eax, ecx
mov dword [esi + 0x4dc], eax
jmp 0x45385c
mov edx, dword [edi]
push str.LoopCount
push edx
call fcn.00445110
add esp, 8
cmp eax, ebx
je 0x45385c
add eax, 0xa
push eax
call fcn.0044f4bc
add esp, 4
mov dword [esi + 0x1bc], eax
mov eax, dword [edi + 4]
add edi, 4
cmp eax, ebx
jne 0x4536b4
mov eax, dword [esi + 0x4b0]
mov word [esi + 0xfc], 1
mov cx, word [eax + 4]
mov word [esi + 0xfe], cx
xor ecx, ecx
mov cx, word [esi + 0x108]
mov word [esi + 0x10a], 0x10
mov edx, dword [eax + 8]
mov dword [esi + 0x100], edx
mov word [esi + 0x10c], bx
push 0xffffffffffffffff
xor edi, edi
imul ecx, dword [eax + 8]
mov di, word [esi + 0x108]
lea eax, [esi + 0x1e0]
push eax
mov dword [esi + 0x104], ecx
call fcn.00477cc0
imul eax, edi
mov ecx, dword [esi + 0x100]
mov dword [esi + 0x124], eax
mov eax, edi
imul eax, ecx
mov dword [esi + 0x1a0], ecx
imul eax, dword [0x4a15dc]
xor edx, edx
mov dword [esi + 0x24], eax
div dword [0x4a15d8]
xor edx, edx
add esp, 8
mov ecx, eax
div edi
mov dword [esi + 0x24], ecx
cmp edx, ebx
je 0x45390a
sub edi, edx
add edi, ecx
mov dword [esi + 0x24], edi
mov edi, dword [ebp + 8]
mov edx, dword [esi + 0x24]
shl edx, 1
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebx
mov dword [esi + 0x4e0], eax
jne 0x453948
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add esi, 0x1e0
push esi
mov dword [edi], ebx
call fcn.00476c90
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x4c8], ebx
mov dword [esi + 0x4cc], ebx
cmp dword [esi + 0xf8], ebx
je 0x453990
mov eax, dword [esi + 0x24]
xor ecx, ecx
mov cx, word [esi + 0xfe]
xor edx, edx
lea edi, [ecx*8]
sub edi, ecx
shl edi, 3
div edi
mov dword [esi + 0x1a4], eax
imul eax, ecx
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 3
mov dword [esi + 0x24], ecx
mov edx, dword [esi + 0x24]
imul edx, dword [0x4a15d8]
xor eax, eax
mov dword [esi + 0x28], edx
mov ecx, 9
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov al, byte [ebp + 0x14]
test al, 8
mov ecx, 0x181e0
mov dword [esp + 0x1c], 0x24
mov dword [esp + 0x20], ecx
je 0x4539c6
mov dword [esp + 0x20], ecx
test al, 0x10
je 0x4539d2
mov dword [esp + 0x20], 0x181e8
mov eax, dword [esi + 0x28]
lea ecx, [esi + 0xfc]
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ecx
cmp dword [esi], ebx
je 0x4539f1
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
push ebx
lea edi, [esi + 0x1c]
push edi
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [edx + 0xc]
test eax, eax
je 0x453a1e
cmp dword [esi], ebx
je 0x453a16
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp + 8]
mov edx, dword [edi]
push edx
jmp 0x453a55
test byte [ebp + 0x14], 0x20
je 0x453a2b
mov dword [esi + 0x20], ebx
xor edi, edi
jmp 0x453a3d
mov eax, dword [edi]
mov ecx, dword [eax]
lea edx, [esi + 0x20]
push edx
push 0x47f9b0
push eax
call dword [ecx]
mov edi, eax
cmp dword [esi], ebx
je 0x453a4b
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, ebx
je 0x453a77
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [edi], ebx
mov esi, dword [esi + 0x4e0]
cmp esi, ebx
je 0x453a6e
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x18]
pop edi
mov dword [esi + 0x1cc], ecx
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret