Function at 0x10154297
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov ebp, dword [esp + 0x30]
mov edx, dword [ebp]
mov eax, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x30]
push esi
push edx
push 0x10167f04
mov esi, ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], 0
call fcn.1014d037
add esp, 8
test eax, eax
mov dword [esp + 0x18], eax
jne 0x101542e2
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x20
ret
push edi
mov ecx, 0x1c
mov esi, ebx
call fcn.10143be7
mov edi, eax
test edi, edi
je 0x101543a7
mov edx, dword [esp + 0x3c]
xor eax, eax
mov ecx, edi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x18], eax
mov dword [edi], ebx
mov dword [edi + 4], edx
mov esi, dword [ebp + 0x40]
test esi, esi
mov eax, 0xfff0bdc0
je 0x10154344
mov ecx, dword [ebx + 0x14]
xor eax, eax
test ecx, ecx
jle 0x10154344
mov ecx, dword [ebx + 0x10]
add ecx, 0xc
mov edi, edi
cmp dword [ecx], esi
je 0x10154344
inc eax
add ecx, 0x10
cmp eax, dword [ebx + 0x14]
jl 0x10154337
mov ecx, dword [ebx + 0x10]
mov esi, dword [ebp + 0x34]
shl eax, 4
mov eax, dword [eax + ecx]
mov dword [esi + 4], eax
mov ecx, dword [ebx + reloc.WINMM.dll_midiStreamOut]
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x2c]
mov dword [ebx + reloc.WINMM.dll_midiStreamOut], eax
mov eax, dword [esp + 0x28]
mov edx, dword [edx + 8]
lea esi, [edi + 8]
push esi
push eax
push ecx
push edx
push ebx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], edi
call dword [esp + 0x58]
mov ecx, dword [esp + 0x2c]
add esp, 0x18
cmp eax, 7
mov dword [esp + 0x24], eax
mov dword [ebx + reloc.WINMM.dll_midiStreamOut], ecx
jne 0x101543bf
mov byte [ebx + 0x38], 1
jmp 0x101543c5
mov eax, dword [esp + 0x1c]
mov ecx, ebx
call fcn.101394e7
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x20
ret
xor ecx, ecx
cmp eax, ecx
je 0x10154421
mov eax, dword [esp + 0x18]
test eax, eax
mov esi, ebx
jne 0x101543f5
mov edx, dword [esp + 0x1c]
push edx
push 0x10188084
call fcn.1014d037
mov ecx, dword [esp + 0x4c]
mov dword [ecx], eax
add esp, 8
mov eax, edi
mov ecx, ebx
call fcn.101394e7
jmp 0x10154582
push eax
push 0x10167f04
call fcn.1014d037
mov edx, dword [esp + 0x4c]
mov dword [edx], eax
mov eax, dword [esp + 0x20]
push eax
call fcn.10139447
add esp, 0xc
mov eax, edi
mov ecx, ebx
call fcn.101394e7
jmp 0x10154582
mov esi, dword [esi]
cmp esi, ecx
je 0x10154582
mov edx, dword [esp + 0x3c]
mov eax, dword [edx]
mov dword [esi], eax
mov dword [edi + 0xc], 1
cmp dword [esp + 0x2c], ecx
je 0x1015446d
mov ecx, dword [ebp]
push ecx
push 0x10188054
mov esi, ebx
call fcn.1014d037
mov edx, dword [esp + 0x4c]
add esp, 8
mov esi, edi
mov dword [edx], eax
call fcn.10141887
mov dword [esp + 0x24], 1
jmp 0x10154582
mov eax, dword [ebp + 0x38]
mov dword [edi + 0x18], eax
cmp word [ebp + 0x26], cx
mov dword [ebp + 0x38], edi
mov dword [esp + 0x20], ecx
jle 0x10154582
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x14]
mov esi, dword [edx + ecx + 0xc]
xor edi, edi
test esi, esi
je 0x10154562
mov ecx, esi
call fcn.101396e7
push 6
push esi
push 0x1018804c
mov dword [esp + 0x1c], eax
call fcn.10139807
add esp, 0xc
test eax, eax
jne 0x101544c7
mov al, byte [esi + 6]
test al, al
je 0x10154506
cmp al, 0x20
je 0x10154506
mov eax, dword [esp + 0x10]
xor edi, edi
test eax, eax
jle 0x10154562
mov edi, edi
push 7
lea eax, [edi + esi]
push eax
push 0x10188044
call fcn.10139807
add esp, 0xc
test eax, eax
jne 0x101544fa
mov al, byte [edi + esi + 7]
test al, al
je 0x10154505
cmp al, 0x20
je 0x10154505
mov eax, dword [esp + 0x10]
inc edi
cmp edi, eax
jl 0x101544d7
jmp 0x10154562
inc edi
cmp edi, dword [esp + 0x10]
jge 0x10154562
mov al, byte [edi + esi + 6]
lea edx, [edi + esi]
xor ecx, ecx
test al, al
setne cl
add ecx, 6
lea eax, [ecx + edi]
cmp eax, dword [esp + 0x10]
jg 0x10154545
mov ebp, ecx
mov eax, edx
sub ebp, esi
mov bl, byte [eax + ecx]
mov byte [eax], bl
mov ebx, dword [esp + 0x10]
inc eax
lea esi, [eax + ebp]
cmp esi, ebx
jle 0x1015452c
mov ebp, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
cmp byte [edx], 0
jne 0x10154552
test edi, edi
jle 0x10154552
mov byte [edx - 1], 0
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x14]
or byte [edx + ecx + 0x16], 2
lea eax, [edx + ecx + 0x16]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
movsx ecx, word [ebp + 0x26]
inc eax
add esi, 0x18
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], esi
jl 0x10154488
mov eax, dword [esp + 0x1c]
mov ecx, ebx
call fcn.101394e7
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret