Function at 0x4a58c5
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x3c]
cmp ecx, dword [esi + 0x3c]
push edi
je 0x4a58de
or eax, 0xffffffff
mov dword [esi + 0x1c], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x3c], ecx
mov eax, dword [esp + 0x3c]
mov edi, dword [esi + 0xc]
mov ecx, dword [edi + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
mov al, byte [edi + 6]
test al, al
mov dword [esp + 0x18], ecx
jbe 0x4a5cc0
fld dword [esp + 0x38]
call fcn.007c4b80
mov edx, dword [edi + 8]
test edx, edx
mov dword [esp + 0x2c], eax
jne 0x4a592b
test eax, eax
jge 0x4a591a
xor ebx, ebx
jmp 0x4a598a
movzx ecx, word [edi + 4]
cmp eax, ecx
jl 0x4a5927
lea ebx, [ecx - 1]
jmp 0x4a598a
mov ebx, eax
jmp 0x4a598a
movzx ecx, word [edx]
cmp eax, ecx
jge 0x4a5936
xor ebx, ebx
jmp 0x4a598a
mov ecx, dword [esi + 0x1c]
cmp ecx, 1
jge 0x4a5942
xor ecx, ecx
jmp 0x4a5943
dec ecx
lea ebp, [edx + ecx*2]
movzx edx, word [ebp]
cmp edx, eax
jg 0x4a5972
movzx edx, word [edi + 4]
sub edx, 2
cmp ecx, edx
jge 0x4a5987
add ebp, 2
lea esp, [esp]
movzx ebx, word [ebp]
cmp ebx, eax
jg 0x4a5987
inc ecx
add ebp, 2
cmp ecx, edx
jl 0x4a5960
jmp 0x4a5987
test ecx, ecx
jle 0x4a5987
mov edx, ebp
movzx ebx, word [edx]
cmp ebx, eax
jle 0x4a5987
dec ecx
sub edx, 2
test ecx, ecx
jg 0x4a5978
lea ebx, [ecx + 1]
movzx edx, byte [edi + 0x10]
mov ecx, 0x1f
sub ecx, edx
mov ebp, DirectSoundCreate
shr ebp, cl
mov ecx, edx
mov eax, ebx
sar eax, cl
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x24], eax
mov eax, ebp
and eax, ebx
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x1c]
mov edx, eax
sar edx, cl
lea ecx, [ebx + 1]
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x28], edx
cmp dword [esi + 0x28], ebx
jne 0x4a59e5
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0x24]
mov ebp, dword [esp + 0x20]
mov dword [esi + 0x30], edx
mov dword [esi + 0x24], ecx
mov dword [esi + 0x28], eax
jmp 0x4a5b1a
cmp eax, ecx
jne 0x4a5a34
mov cl, byte [edi + 6]
xor eax, eax
test cl, cl
mov dword [esp + 0x14], eax
jbe 0x4a5a2e
mov ecx, dword [esi + 0x24]
mov edx, dword [esi + 0x30]
add ecx, eax
mov ebx, dword [ecx]
add edx, eax
mov dword [edx], ebx
mov ebx, dword [ecx + 4]
mov dword [edx + 4], ebx
mov ebx, dword [ecx + 8]
mov dword [edx + 8], ebx
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
mov ecx, dword [esp + 0x14]
movzx edx, byte [edi + 6]
inc ecx
add eax, 0x10
cmp ecx, edx
mov dword [esp + 0x14], ecx
jl 0x4a59f6
mov ebx, dword [esp + 0x3c]
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x28], eax
mov ecx, dword [esi + 0x18]
mov edx, dword [esp + 0x24]
imul ecx, edx
add ecx, dword [esi + 0x14]
cmp ebx, eax
mov dword [esp + 0x10], ecx
jge 0x4a5a57
cmp byte [0x8ee4e4], 0
mov byte [esp + 0x3c], 1
je 0x4a5a5c
mov byte [esp + 0x3c], 0
cmp eax, 0xffffffff
je 0x4a5a7b
cmp edx, dword [esp + 0x28]
jne 0x4a5a77
mov cl, byte [esp + 0x3c]
test cl, cl
jne 0x4a5a77
mov ecx, dword [esp + 0x10]
and eax, ebp
jmp 0x4a5ae6
mov ecx, dword [esp + 0x10]
mov al, byte [edi + 6]
xor ebp, ebp
test al, al
jbe 0x4a5ae4
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x14], ecx
lea esp, [esp]
mov eax, dword [esp + 0x18]
movzx eax, byte [eax + ebp]
mov ecx, eax
and ecx, 0x1f
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x40]
sar eax, 5
test dword [ecx + eax*4], edx
je 0x4a5ac1
mov edx, dword [esi + 0x24]
add edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x14]
push edx
call fcn.00496d90
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x14]
add eax, 0x10
mov dword [esp + 0x3c], eax
movzx eax, byte [edi + 6]
inc ebp
add edx, 6
cmp ebp, eax
mov dword [esp + 0x14], edx
jl 0x4a5a90
mov ecx, dword [esp + 0x10]
xor eax, eax
mov ebp, dword [esp + 0x20]
cmp eax, ebp
jge 0x4a5b04
mov edx, dword [esp + 0x40]
push edx
mov edx, dword [esi + 0x24]
push edx
push ebp
push eax
push edi
push ecx
mov ecx, esi
call fcn.00497430
jmp 0x4a5b1a
jle 0x4a5b1a
mov edx, dword [esp + 0x40]
push edx
mov edx, dword [esi + 0x24]
push edx
push ebp
push eax
push edi
push ecx
mov ecx, esi
call fcn.00497510
mov dword [esi + 0x1c], ebx
mov ecx, dword [edi + 8]
xor edx, edx
cmp ecx, edx
jne 0x4a5b45
fild dword [esp + 0x2c]
fld st(0)
fld dword [esp + 0x38]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x4a5c50
fld dword [esp + 0x38]
fsub st(1)
jmp 0x4a5bab
cmp ebx, edx
jne 0x4a5b75
fld dword [0x890968]
fld dword [esp + 0x38]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x4a5c52
movzx eax, word [ecx]
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fdivr dword [esp + 0x38]
fstp dword [esp + 0x38]
jmp 0x4a5bb1
movzx eax, word [ecx + ebx*2 - 2]
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fld st(0)
fld dword [esp + 0x38]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x4a5c50
movzx ecx, word [ecx + ebx*2]
fld dword [esp + 0x38]
fsub st(1)
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
fsub st(2)
fdivp st(1)
fstp dword [esp + 0x38]
fstp st(0)
movzx eax, word [edi + 4]
dec eax
cmp ebx, eax
jge 0x4a5c52
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
push ecx
push ebp
push edx
push eax
push edi
mov ecx, esi
call fcn.00497600
mov al, byte [edi + 6]
xor ebx, ebx
test al, al
jbe 0x4a5cc0
mov dword [esp + 0x3c], ebx
jmp 0x4a5bf0
mov ecx, dword [esp + 0x18]
movzx eax, byte [ebx + ecx]
mov ebp, dword [esp + 0x40]
mov ecx, eax
and ecx, 0x1f
mov edx, 1
shl edx, cl
mov ecx, eax
sar ecx, 5
test dword [ebp + ecx*4], edx
je 0x4a5c3a
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x3c]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x24]
shl ecx, 4
add ecx, edx
mov edx, dword [esi + 0x30]
add edx, ebp
add eax, ebp
mov ebp, dword [esp + 0x38]
push ebp
call fcn.00496c10
add esp, 4
mov ecx, dword [esp + 0x3c]
movzx edx, byte [edi + 6]
inc ebx
add ecx, 0x10
cmp ebx, edx
mov dword [esp + 0x3c], ecx
jl 0x4a5bf0
jmp 0x4a5cc0
fstp st(0)
mov al, byte [edi + 6]
test al, al
jbe 0x4a5cc0
mov dword [esp + 0x38], edx
lea ecx, [ecx]
mov eax, dword [esp + 0x18]
movzx eax, byte [edx + eax]
mov ebp, dword [esp + 0x40]
mov ecx, eax
and ecx, 0x1f
mov ebx, 1
shl ebx, cl
mov ecx, eax
sar ecx, 5
test dword [ebp + ecx*4], ebx
je 0x4a5cac
mov ecx, dword [esi + 0x24]
add ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
lea eax, [eax + eax*2]
shl eax, 4
add eax, ebx
mov ebx, dword [ecx]
mov dword [eax], ebx
mov ebx, dword [ecx + 4]
mov dword [eax + 4], ebx
mov ebx, dword [ecx + 8]
mov dword [eax + 8], ebx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
mov ebx, dword [esp + 0x38]
movzx eax, byte [edi + 6]
inc edx
add ebx, 0x10
cmp edx, eax
mov dword [esp + 0x38], ebx
jl 0x4a5c60
mov al, byte [edi + 7]
test al, al
jbe 0x4a5d22
xor ebx, ebx
test al, al
jbe 0x4a5d22
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x38], ebx
mov ecx, dword [esi + 0x34]
movzx eax, byte [ecx + ebx]
mov ecx, eax
and ecx, 0x1f
mov edx, 1
shl edx, cl
mov ecx, eax
sar ecx, 5
test dword [ebp + ecx*4], edx
je 0x4a5d0e
mov ecx, dword [esi + 0x38]
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x1c]
shl edx, 4
add edx, eax
mov eax, dword [esp + 0x38]
push edx
add ecx, eax
call fcn.00496d90
mov edx, dword [esp + 0x38]
movzx eax, byte [edi + 7]
inc ebx
add edx, 6
cmp ebx, eax
mov dword [esp + 0x38], edx
jl 0x4a5cd5
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x24
ret 0xc