Function at 0x10182c67
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x58
mov eax, dword [esp + 0x5c]
mov ecx, dword [eax + 0x20]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x60]
imul ecx, ecx, 0x58
push ebx
mov ebx, dword [eax]
push ebp
mov ebp, dword [ebx + 8]
push esi
lea esi, [ecx + eax + 0x38]
movzx ecx, byte [esi + 0x34]
mov eax, dword [eax + 4]
lea ecx, [ecx + ecx*8]
push edi
lea edi, [eax + ecx*8 + 8]
mov ecx, dword [edi + 0x2c]
mov dword [esp + 0x10], ecx
mov ecx, dword [esi]
mov eax, ecx
shr eax, 0x18
xor edx, edx
and eax, 1
test ecx, 0x400000
mov dword [esp + 0x24], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], eax
je 0x10182cd5
test byte [esp + 0x74], 0x20
mov dword [esp + 0x58], 1
je 0x10182cd9
mov dword [esp + 0x58], edx
mov eax, ebp
call fcn.10147467
mov dword [esp + 0x30], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x24], eax
mov eax, ebp
call fcn.10147467
mov dword [esp + 0x4c], eax
mov dword [esi + 0x2c], eax
mov al, byte [esi + 0x34]
test al, al
jbe 0x10182d58
test byte [edi + 0x20], 8
je 0x10182d58
mov edi, dword [ebx + 0x4c]
inc edi
mov dword [ebx + 0x4c], edi
mov ecx, edi
mov dword [esi + 0x18], ecx
mov eax, dword [ebp + 0x1c]
cmp dword [ebp + 0x20], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x60], eax
jg 0x10182d34
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10182d58
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x60]
inc dword [ebp + 0x1c]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
xor edx, edx
mov byte [eax], 7
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov eax, dword [esp + 0x2c]
test byte [eax + 0x24], 4
mov edi, dword [esp + 0x78]
je 0x10182e33
mov ecx, dword [eax + 0x1c]
mov edx, dword [ebp + 0x20]
mov dword [esp + 0x70], ecx
mov ecx, dword [eax + 0x18]
mov eax, dword [ebp + 0x1c]
dec ecx
cmp edx, eax
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], eax
jg 0x10182d9a
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10182dc5
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x5c]
inc dword [ebp + 0x1c]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x70]
xor edi, edi
mov byte [eax], 7
mov byte [eax + 3], 0
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], edi
mov byte [eax + 1], 0
jmp 0x10182dc7
xor edi, edi
mov edx, dword [esp + 0x70]
push edx
push 4
mov eax, ebp
call fcn.101473f7
mov dword [esi + 0x3c], eax
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x20]
add esp, 8
cmp ecx, eax
mov dword [esp + 0x60], eax
jg 0x10182dfa
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10182e2a
mov eax, dword [esp + 0x60]
xor edi, edi
mov ecx, dword [ebp + 0x1c]
mov edx, dword [esp + 0x70]
inc ecx
mov dword [ebp + 0x1c], ecx
mov ecx, dword [ebp + 4]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*4]
mov ecx, dword [esp + 0x30]
inc edx
mov byte [eax], 0x1b
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], edi
mov byte [eax + 1], 0
mov byte [esi + 0x35], 1
jmp 0x10183ed1
mov eax, dword [esi]
test eax, 0x8000000
je 0x101830db
mov ecx, dword [esi + 0x10]
mov edx, dword [ecx + 0x10]
mov eax, dword [ecx]
mov edi, dword [ebx + 0x3c]
mov dword [esp + 0x40], ecx
mov ecx, dword [ecx + 4]
mov dword [esp + 0x44], ecx
inc dword [ebx + 0x5c]
lea ecx, [eax + 2]
cmp ecx, edi
mov dword [esp + 0x3c], edx
mov edx, dword [ebx + 0x40]
mov dword [esp + 0x48], eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x70], edx
jg 0x10182e7f
add edx, ecx
sub edi, ecx
mov dword [ebx + 0x40], edx
mov dword [ebx + 0x3c], edi
jmp 0x10182e8e
mov edx, dword [ebx + 0x4c]
lea edi, [edx + 1]
add ecx, edx
mov dword [esp + 0x70], edi
mov dword [ebx + 0x4c], ecx
mov ecx, 1
cmp eax, ecx
mov dword [esp + 0x28], ecx
jl 0x10182efe
xor edi, edi
test eax, eax
jle 0x10182ef1
lea ebx, [ebx]
mov edx, dword [esp + 0x3c]
cmp dword [edx + edi*8], ecx
je 0x10182eb7
inc edi
cmp edi, eax
jl 0x10182ea7
jmp 0x10182ef1
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x28]
lea esi, [eax + ecx + 1]
mov eax, dword [esp + 0x44]
lea edx, [edi + edi*2]
mov eax, dword [eax + edx*4 + 8]
mov edx, dword [esp + 0x1c]
lea ecx, [eax + eax*4]
mov eax, dword [edx + 0x20]
mov ecx, dword [eax + ecx*8]
mov eax, dword [ecx + 0xc]
mov ecx, ebx
call fcn.10148ff7
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x14]
cmp edi, eax
je 0x10182efe
inc ecx
cmp ecx, eax
mov dword [esp + 0x28], ecx
jle 0x10182e9b
mov edx, dword [esp + 0x40]
mov eax, dword [edx + 0x14]
mov edx, dword [ebp + 0x20]
mov dword [esp + 0x5c], eax
mov eax, dword [ebp + 0x1c]
cmp edx, eax
mov dword [esp + 0x60], eax
jg 0x10182f2a
mov edi, ebp
call fcn.101472c7
test eax, eax
mov ecx, dword [esp + 0x28]
jne 0x10182f56
mov eax, dword [esp + 0x60]
inc dword [ebp + 0x1c]
lea edx, [eax + eax*4]
mov eax, dword [ebp + 4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x5c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x70]
mov dword [eax + 8], edx
xor edx, edx
mov byte [eax], 7
mov byte [eax + 3], 0
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov eax, dword [ebp + 0x1c]
cmp dword [ebp + 0x20], eax
mov dword [esp + 0x60], eax
jg 0x10182f75
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10182f9f
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x28]
inc dword [ebp + 0x1c]
mov edx, dword [ebp + 4]
dec ecx
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x70]
inc ecx
mov dword [eax + 8], ecx
xor ecx, ecx
mov byte [eax], 7
mov byte [eax + 3], 0
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx + 0x1c]
mov edx, dword [ecx + 0x18]
mov ecx, dword [ebp + 0x1c]
neg eax
sbb eax, eax
and eax, 0xfffffff7
add eax, 0xfffffffe
mov dword [esp + 0x5c], eax
cmp dword [ebp + 0x20], ecx
mov dword [esp + 0x58], edx
mov dword [esp + 0x60], ecx
jg 0x10182fdd
mov edi, ebp
call fcn.101472c7
test eax, eax
je 0x10182fd9
mov eax, 1
jmp 0x10183016
mov ecx, dword [esp + 0x60]
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 4]
inc eax
mov dword [ebp + 0x1c], eax
lea eax, [ecx + ecx*4]
lea eax, [edx + eax*4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x30]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x70]
mov byte [eax], 0x88
mov byte [eax + 3], 0
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], 0
mov byte [eax + 1], 0
mov eax, ecx
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
push ebp
call fcn.101476b7
mov eax, dword [esp + 0x44]
mov dword [eax + 0x1c], 0
mov eax, dword [esp + 0x4c]
add esp, 4
test eax, eax
jle 0x1018308f
mov edi, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
add edi, 8
add ecx, 4
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], eax
lea esp, [esp]
mov edx, dword [esp + 0x40]
cmp byte [edx], 0
je 0x10183076
mov eax, dword [edi]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0x20]
lea eax, [eax + eax*4]
lea eax, [edx + eax*8]
mov edx, esi
call fcn.10141ea7
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x48]
add edx, 8
add edi, 0xc
dec eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], eax
jne 0x10183057
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x54]
mov byte [eax + 0x35], 0x8a
mov dword [eax + 0x38], ecx
mov edx, dword [ebp + 0x1c]
mov dword [eax + 0x3c], edx
mov eax, dword [esp + 0x70]
push eax
mov eax, edi
mov esi, ebx
call fcn.1013fb57
mov eax, dword [ebx + 0x3c]
add esp, 4
cmp edi, eax
jle 0x101830ca
mov ecx, dword [esp + 0x70]
mov dword [ebx + 0x3c], edi
mov dword [ebx + 0x40], ecx
mov ecx, 1
mov eax, ebx
call fcn.1013fba7
jmp 0x10183ed1
test ah, 0x10
je 0x101831b6
mov al, byte [ebx + 0x13]
test al, al
jne 0x101830fa
mov eax, dword [ebx + 0x4c]
inc eax
mov edx, eax
mov dword [ebx + 0x4c], eax
mov dword [esp + 0x24], edx
jmp 0x1018310a
dec al
mov byte [ebx + 0x13], al
movzx eax, al
mov ecx, dword [ebx + eax*4 + 0x1c]
mov dword [esp + 0x24], ecx
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
push 0
push 3
push edx
push edi
push 0xffffffffffffffff
push eax
push ecx
call fcn.10166e77
mov edx, dword [esp + 0x40]
push edx
push esi
push eax
push ebx
call fcn.10182827
mov edi, eax
mov eax, dword [esi + 0x28]
mov esi, dword [ebp + 0x1c]
mov dword [esp + 0x54], eax
mov eax, dword [ebp + 0x20]
add esp, 0x2c
cmp eax, esi
mov dword [esp + 0x70], edi
jg 0x1018315b
mov edi, ebp
call fcn.101472c7
test eax, eax
mov edi, dword [esp + 0x70]
jne 0x10183187
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 4]
inc eax
mov dword [ebp + 0x1c], eax
lea ecx, [esi + esi*4]
lea eax, [edx + ecx*4]
mov ecx, dword [esp + 0x28]
mov dword [eax + 8], ecx
xor ecx, ecx
mov byte [eax], 0x15
mov byte [eax + 3], 0
mov dword [eax + 4], edi
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x10]
push edi
push edx
push esi
push 0x36
mov eax, ebp
call fcn.10147347
push edi
push 0xffffffffffffffff
push esi
mov esi, ebx
call fcn.1013fa47
mov eax, dword [esp + 0x30]
add esp, 0x1c
mov byte [eax + 0x35], 0x95
jmp 0x10183ed1
test ah, 0x20
je 0x10183402
mov ecx, dword [esp + 0x7c]
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
push 0
push 0x24
push ecx
push edi
push 0xffffffffffffffff
push esi
push edx
mov dword [esp + 0x50], 0x95
mov dword [esp + 0x64], 0
call fcn.10166e77
mov ecx, dword [esp + 0x38]
push 0
push 0x18
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xa0]
push eax
push edi
push 0xffffffffffffffff
push esi
push ecx
call fcn.10166e77
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x58]
add esp, 0x38
test eax, eax
je 0x1018322a
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x70], edx
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x70]
test ecx, ecx
je 0x101832a2
mov eax, ecx
mov edi, dword [eax]
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [edi + 0xc]
mov esi, ebx
mov byte [esp + 0x3c], 0x31
mov byte [esp + 0x3d], 0x2f
mov byte [esp + 0x3e], 0x2e
mov byte [esp + 0x3f], 0x30
call fcn.10148f67
movzx ecx, byte [edi]
mov edx, dword [esp + 0x34]
mov esi, eax
mov eax, dword [esp + 0x14]
push esi
push edx
movzx edx, byte [esp + ecx - 9]
push eax
push edx
mov eax, ebp
call fcn.10147347
push esi
mov eax, 1
mov esi, ebx
call fcn.1013fb57
mov esi, dword [esp + 0x78]
add esp, 0x18
mov edx, ebx
call fcn.1013fdc7
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x70]
mov edx, edi
call fcn.10141ea7
jmp 0x101832c3
mov ecx, dword [esp + 0x30]
neg eax
sbb eax, eax
push 0
push ecx
and eax, 0xfffffffb
add eax, 0x48
push esi
push eax
mov eax, ebp
call fcn.10147347
mov edi, dword [esp + 0x24]
add esp, 0x10
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1018332b
mov edx, eax
mov eax, dword [edx]
mov edx, dword [ebx + 0x4c]
inc edx
mov dword [esp + 0x60], eax
mov dword [ebx + 0x4c], edx
mov eax, dword [eax + 0xc]
mov esi, edx
mov ecx, ebx
mov dword [esp + 0x48], esi
call fcn.10148ff7
mov eax, dword [esp + 0x60]
mov al, byte [eax]
cmp al, 0x4f
je 0x1018330d
cmp al, 0x4d
je 0x1018330d
mov eax, dword [esp + 0x20]
xor ecx, ecx
test eax, eax
setne cl
lea ecx, [ecx + ecx + 0x4d]
mov dword [esp + 0x34], ecx
jmp 0x10183320
mov eax, dword [esp + 0x20]
xor edx, edx
test eax, eax
sete dl
lea edx, [edx + edx + 0x4e]
mov dword [esp + 0x34], edx
mov eax, dword [esp + 0x28]
mov edx, edi
call fcn.10141ea7
mov esi, dword [esp + 0x20]
mov eax, dword [ebp + 0x1c]
mov edx, dword [esp + 0x10]
test esi, esi
sete cl
dec cl
and cl, 0xfd
mov dword [edi + 0x3c], eax
mov eax, dword [esp + 0x70]
add cl, 0x5f
test eax, eax
mov byte [edi + 0x35], cl
mov dword [edi + 0x38], edx
jne 0x10183360
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x10183360
mov byte [edi + 0x36], 1
cmp dword [esp + 0x34], 0x95
je 0x10183ed1
mov eax, ebx
call fcn.1013fda7
mov esi, dword [ebp + 0x1c]
mov edi, eax
cmp dword [ebp + 0x20], esi
mov dword [esp + 0x24], edi
jg 0x10183392
mov edi, ebp
call fcn.101472c7
test eax, eax
mov edi, dword [esp + 0x24]
jne 0x101833be
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x10]
inc eax
mov dword [ebp + 0x1c], eax
lea eax, [esi + esi*4]
lea eax, [ecx + eax*4]
xor ecx, ecx
mov byte [eax], 0x41
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], edi
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov eax, dword [esp + 0x10]
push edi
push 0xffffffffffffffff
push eax
mov esi, ebx
call fcn.1013fa47
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x40]
push edi
push ecx
push edx
push eax
mov eax, ebp
call fcn.10147347
mov eax, dword [ebp + 4]
add esp, 0x1c
test eax, eax
je 0x10183ed1
mov ecx, dword [ebp + 0x1c]
lea ecx, [ecx + ecx*4]
mov byte [eax + ecx*4 - 0x11], 0x6b
jmp 0x10183ed1
test eax, 0x30000
je 0x10183959
mov edx, dword [esi + 0x20]
movzx ecx, word [esi + 4]
mov ebx, dword [esi + 0x10]
xor eax, eax
mov dword [esp + 0x38], edx
cmp ecx, dword [ebx + 0x24]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x60], ebx
jne 0x10183440
mov dword [esp + 0x40], reloc.WINMM.dll_midiStreamOut
jmp 0x1018344a
mov edx, dword [ebx + 4]
mov edx, dword [edx + ecx*4]
mov dword [esp + 0x40], edx
test byte [esp + 0x74], 1
je 0x10183467
test dword [esi], reloc.WINMM.dll_midiStreamOut
je 0x10183467
cmp dword [ebx + 0x24], ecx
jle 0x10183467
mov eax, 1
mov dword [esp + 0x50], eax
test dword [esi], reloc.WINMM.dll_midiStreamOut
je 0x1018349b
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x10]
push ebx
push 0x18
push eax
mov eax, dword [esp + 0x28]
push edi
push ecx
push edx
push eax
call fcn.10166e77
mov dword [esp + 0x8c], eax
add esp, 0x1c
mov eax, 1
test dword [esi], reloc.WINMM.dll_midiStreamOut
je 0x101834cc
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x10]
push ebx
push 0x24
push ecx
mov ecx, dword [esp + 0x28]
push edi
push edx
push eax
push ecx
call fcn.10166e77
mov dword [esp + 0x4c], eax
add esp, 0x1c
mov eax, 1
mov ecx, dword [esp + 0x78]
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x84]
push eax
push ecx
push edx
push edi
push esi
call fcn.10182a27
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x48], eax
mov eax, dword [esi]
push eax
call fcn.10143d37
mov ecx, dword [edi + 0x28]
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x60], eax
mov eax, dword [ecx + 0x24]
add esp, 0x20
cmp edi, eax
jge 0x10183538
mov edx, dword [ecx + 0x1c]
mov bl, byte [edi + edx]
mov edx, dword [esp + 0x20]
xor ecx, ecx
test bl, bl
sete cl
cmp edx, ecx
je 0x10183544
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x10183556
cmp eax, edi
jne 0x10183556
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x70], ecx
mov dword [esp + 0x30], eax
jmp 0x1018355e
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x30]
xor esi, esi
cmp eax, esi
je 0x10183575
test byte [eax + 0x10], 0x28
jne 0x10183575
mov dword [esp + 0x44], esi
mov edx, 1
jmp 0x1018357e
mov edx, 1
mov dword [esp + 0x44], edx
cmp ecx, esi
je 0x1018358c
test byte [ecx + 0x10], 0x28
mov dword [esp + 0x54], esi
je 0x10183590
mov dword [esp + 0x54], edx
cmp eax, esi
jne 0x1018359c
cmp edi, esi
mov dword [esp + 0x48], esi
jle 0x101835a0
mov dword [esp + 0x48], edx
xor ebx, ebx
cmp eax, ebx
mov esi, edi
je 0x1018360f
mov edx, dword [esp + 0x30]
mov eax, dword [edx]
mov ebx, dword [eax + 0xc]
mov ecx, dword [esp + 0x2c]
lea esi, [ecx + edi]
mov ecx, dword [esp + 0x18]
mov eax, ebx
mov dword [esp + 0x3c], ebx
call fcn.10148ff7
mov edx, dword [esp + 0x28]
push edx
push esi
mov eax, ebx
mov ecx, ebp
call fcn.10148dd7
mov eax, dword [esp + 0x3c]
add esp, 8
test eax, eax
je 0x1018360a
mov esi, eax
mov bl, byte [esi + edi]
mov eax, dword [esp + 0x3c]
call fcn.10148897
cmp al, 0x62
jne 0x101835f6
mov byte [esi + edi], al
mov dl, byte [esi + edi]
mov ecx, dword [esp + 0x3c]
call fcn.1013f927
test eax, eax
je 0x1018360a
mov byte [esi + edi], 0x62
lea esi, [edi + 1]
jmp 0x1018366e
cmp dword [esp + 0x50], ebx
je 0x1018366e
mov esi, dword [ebp + 0x1c]
cmp dword [ebp + 0x20], esi
jg 0x10183628
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10183659
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x2c]
inc eax
mov dword [ebp + 0x1c], eax
lea eax, [esi + esi*4]
lea eax, [ecx + eax*4]
mov ecx, dword [esp + 0x3c]
add edx, ecx
mov byte [eax], 0xa
mov byte [eax + 3], 0
mov dword [eax + 4], ebx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov byte [eax + 1], 0
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x3c]
inc esi
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], 1
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
push esi
push ebx
push edx
call fcn.1014b237
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
lea edx, [eax + ecx*2]
mov eax, dword [esp + 0x2c]
movzx ecx, byte [eax + edx*2 + 0x10183c18]
mov edx, dword [esp + 0x44]
push esi
push ecx
mov ecx, dword [esp + 0x3c]
push ebp
mov eax, ebx
call fcn.1014f1b7
mov eax, dword [esp + 0x88]
add esp, 0x18
test eax, eax
mov esi, edi
je 0x10183750
mov esi, dword [esp + 0x18]
mov edx, eax
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
mov edx, ebx
lea ebx, [edx + edi]
push ebx
mov eax, 1
mov dword [esp + 0x40], ecx
call fcn.1013fb57
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x1c]
mov esi, ebx
call fcn.10148ff7
mov eax, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x44]
push ebx
mov ecx, ebp
call fcn.10148dd7
mov eax, dword [esp + 0x4c]
add esp, 0xc
test eax, eax
mov esi, eax
je 0x10183732
mov bl, byte [esi + edi]
mov eax, dword [esp + 0x3c]
call fcn.10148897
cmp al, 0x62
jne 0x1018371e
mov byte [esi + edi], al
mov dl, byte [esi + edi]
mov ecx, dword [esp + 0x3c]
call fcn.1013f927
test eax, eax
je 0x10183732
mov byte [esi + edi], 0x62
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
lea ebx, [edi + 1]
push ebx
push ecx
push edx
mov eax, esi
call fcn.1014b237
mov esi, ebx
mov ebx, dword [esp + 0x38]
add esp, 0xc
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
mov ecx, dword [ecx]
call fcn.101394e7
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
mov ecx, dword [edx]
call fcn.101394e7
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0x3c], eax
mov eax, dword [esp + 0x70]
test eax, eax
jne 0x10183788
test edi, edi
jne 0x10183788
xor eax, eax
jmp 0x1018378d
mov eax, 1
mov edx, dword [esp + 0x20]
inc edx
imul edx, eax
movzx eax, byte [edx + 0x10183c20]
cmp eax, 0x95
je 0x101837d4
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
push esi
push eax
push ebp
mov eax, ebx
call fcn.1014f1b7
mov eax, dword [ebp + 4]
add esp, 0xc
test eax, eax
je 0x101837d4
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0x54], ecx
mov ecx, dword [ebp + 0x1c]
setne dl
lea ecx, [ecx + ecx*4]
mov byte [eax + ecx*4 - 0x11], dl
mov eax, dword [esp + 0x18]
call fcn.1013fda7
mov edx, dword [esp + 0x14]
mov esi, eax
test dword [edx], reloc.WINMM.dll_midiStreamOut
je 0x1018383f
mov eax, dword [esp + 0x38]
push esi
push edi
push eax
push 0x1d
mov eax, ebp
call fcn.10147347
mov ebx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
add esp, 0x10
cmp eax, ebx
jg 0x10183813
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x1018383f
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 4]
inc eax
mov dword [ebp + 0x1c], eax
lea ecx, [ebx + ebx*4]
lea eax, [edx + ecx*4]
mov ecx, dword [esp + 0x4c]
mov dword [eax + 8], ecx
xor ecx, ecx
mov byte [eax], 0x49
mov byte [eax + 3], 0
mov dword [eax + 4], esi
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov edi, dword [esp + 0x18]
mov edx, edi
call fcn.1013fdc7
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
call fcn.10141ea7
mov eax, dword [esp + 0x70]
call fcn.10141ea7
mov eax, dword [esp + 0x58]
xor ebx, ebx
cmp eax, ebx
jne 0x10183917
mov eax, edi
call fcn.1013fda7
mov esi, dword [ebp + 0x1c]
mov dword [esp + 0x24], eax
cmp dword [ebp + 0x20], esi
jg 0x1018388c
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x101838bb
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x38]
inc eax
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 4]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x24]
mov byte [eax], 0x63
mov byte [eax + 3], 0
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov byte [eax + 1], 0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
push eax
push 0xffffffffffffffff
push ecx
call fcn.1013fa47
mov esi, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
add esp, 0xc
cmp eax, esi
jg 0x101838e8
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10183917
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x10]
inc eax
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 4]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x24]
mov byte [eax], 0x32
mov byte [eax + 3], 0
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov byte [eax + 1], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
test ecx, 0x2000000
je 0x1018392b
mov byte [eax + 0x35], 0x95
jmp 0x1018393d
cmp dword [esp + 0x20], ebx
sete dl
dec dl
and dl, 0xfd
add dl, 0x5f
mov byte [eax + 0x35], dl
test ecx, ecx
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x18]
mov dword [eax + 0x38], edx
jns 0x10183ed1
mov byte [eax + 0x36], 1
jmp 0x10183ed1
test eax, 0x10000000
je 0x10183e9b
mov eax, dword [ebx + 0x48]
xor edi, edi
mov dword [esp + 0x50], eax
inc eax
mov dword [ebx + 0x48], eax
mov eax, dword [ebx + 0x4c]
inc eax
mov dword [ebx + 0x4c], eax
mov dword [esp + 0x38], eax
mov eax, ebp
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x54], edi
call fcn.10147467
mov edx, dword [esp + 0x38]
mov dword [esp + 0x5c], eax
mov eax, dword [esi + 0x10]
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x64], eax
mov byte [esi + 0x35], 3
mov dword [esi + 0x38], edx
mov eax, dword [ecx + 0x1c]
cmp eax, 1
mov dword [esp + 0x60], edi
mov dword [esp + 0x20], edi
jle 0x10183a72
sub eax, dword [esp + 0x70]
mov esi, dword [ebx]
dec eax
lea ecx, [eax + eax*8]
lea ecx, [ecx*8 + 0x50]
mov dword [esp + 0x58], eax
call fcn.10143be7
test eax, eax
mov dword [esp + 0x34], eax
je 0x10184076
mov ecx, dword [esp + 0x58]
mov esi, dword [esp + 0x2c]
inc ecx
mov word [eax + 2], cx
mov word [eax], cx
lea edi, [eax + 8]
mov ecx, 0x12
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx + 4]
mov ecx, dword [esp + 0x58]
add edx, 8
cmp ecx, 1
jl 0x10183a79
add eax, 0x50
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x14]
add eax, 0x8c
mov dword [esp + 0x48], eax
mov dword [esp + 0x58], ecx
jmp 0x10183a37
mov ecx, dword [esp + 0x48]
movzx eax, byte [ecx]
mov edi, dword [esp + 0x44]
lea eax, [eax + eax*8]
lea esi, [edx + eax*8]
mov eax, dword [esp + 0x58]
mov ecx, 0x12
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
add esi, 0x58
add ecx, 0x48
dec eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x58], eax
jne 0x10183a37
jmp 0x10183a79
mov ecx, dword [ecx + 4]
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x74]
and eax, 8
mov dword [esp + 0x44], eax
jne 0x10183ad5
mov eax, dword [ebx + 0x4c]
lea ecx, [eax + 1]
lea eax, [ecx + 1]
mov dword [ebx + 0x4c], eax
mov esi, dword [ebp + 0x1c]
mov dword [esp + 0x54], eax
cmp dword [ebp + 0x20], esi
mov dword [esp + 0x28], ecx
jg 0x10183ab1
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10183ad5
mov ecx, dword [esp + 0x28]
inc dword [ebp + 0x1c]
mov eax, dword [ebp + 4]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
xor edx, edx
mov byte [eax], 0xa
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
mov byte [eax + 1], dl
mov esi, dword [ebp + 0x1c]
cmp dword [ebp + 0x20], esi
jg 0x10183af2
mov edi, ebp
call fcn.101472c7
test eax, eax
je 0x10183af2
mov dword [esp + 0x48], 1
jmp 0x10183b22
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 4]
inc eax
mov dword [ebp + 0x1c], eax
lea ecx, [esi + esi*4]
lea eax, [edx + ecx*4]
mov edx, dword [esp + 0x38]
xor ecx, ecx
mov byte [eax], 7
mov byte [eax + 3], 0
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov dword [esp + 0x48], esi
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x18]
cmp eax, 1
jle 0x10183c26
xor edi, edi
cmp eax, edi
mov dword [esp + 0x58], edi
jle 0x10183c26
mov esi, dword [esp + 0x20]
lea ecx, [ecx]
mov eax, dword [edx + 0x20]
mov ecx, dword [eax + edi]
add eax, edi
test byte [ecx + 2], 1
jne 0x10183b83
test byte [eax + 0x12], 0x12
jne 0x10183b83
test word [eax + 0x10], 0xfff
je 0x10183b83
mov eax, dword [ebx]
push 0
push 0
push ecx
push eax
call fcn.10157e77
mov ecx, dword [ebx]
push eax
mov eax, esi
call fcn.1014f907
mov edx, dword [esp + 0x30]
add esp, 0x14
mov esi, eax
mov eax, dword [esp + 0x58]
mov ecx, dword [edx + 0x18]
inc eax
add edi, 0x28
cmp eax, ecx
mov dword [esp + 0x58], eax
jl 0x10183b47
test esi, esi
mov dword [esp + 0x20], esi
je 0x10183c2a
mov esi, dword [ebx]
mov ecx, 0x2c
call fcn.10143be7
mov esi, eax
test esi, esi
je 0x10183bcf
mov ecx, 0xb
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov byte [esi], 0x45
mov word [esi + 0x1e], 0xffff
mov dword [esi + 0x14], 1
test esi, esi
mov edi, dword [ebx]
jne 0x10183bec
push esi
push edi
call fcn.10148957
mov ecx, dword [esp + 0x28]
push ecx
push edi
call fcn.10148957
add esp, 0x10
jmp 0x10183c22
mov eax, dword [esp + 0x20]
xor edx, edx
mov dword [esi + 0xc], eax
mov dx, word [eax + 2]
and edx, 0x100
or word [esi + 2], dx
call fcn.1013f677
mov eax, dword [ebx]
mov eax, dword [eax + 0x5c]
cmp dword [esi + 0x14], eax
jle 0x10183c22
push eax
push 0x101879e4
mov edi, ebx
call fcn.1014d297
add esp, 8
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0x18]
xor ecx, ecx
cmp edx, ecx
mov dword [esp + 0x40], ecx
jle 0x10183dce
mov dword [esp + 0x3c], ecx
lea esp, [esp]
mov eax, dword [eax + 0x20]
mov edi, dword [esp + 0x3c]
mov ecx, dword [eax + edi + 8]
mov edx, dword [esp + 0x10]
add eax, edi
cmp ecx, edx
je 0x10183c68
cmp word [eax + 0x10], 0x200
jne 0x10183dab
test esi, esi
mov eax, dword [eax]
je 0x10183c73
mov dword [esi + 8], eax
mov eax, esi
mov edx, dword [esp + 0x50]
push edx
push 0xf0
push 0
push 0
push eax
mov eax, dword [esp + 0x48]
push eax
push ebx
call fcn.10189917
mov edi, eax
add esp, 0x1c
test edi, edi
mov dword [esp + 0x58], edi
je 0x10183dab
mov ecx, dword [esp + 0x14]
movzx edx, byte [ecx + 0x34]
mov ecx, dword [esp + 0x70]
push 0
push edx
mov edx, dword [esp + 0x3c]
push ecx
lea eax, [edi + 0x38]
push eax
push edx
mov eax, ebx
call fcn.10154b27
add esp, 0x14
cmp word [esp + 0x44], 0
jne 0x10183d15
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x18]
mov eax, dword [esp + 0x40]
dec ecx
cmp eax, ecx
jne 0x10183cde
or esi, reloc.WINMM.dll_midiStreamOut
jmp 0x10183ce2
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
push 0
push edx
mov edx, dword [ecx + 0x10]
push eax
push 0xffffffffffffffff
push edx
mov eax, ebx
call fcn.1016ae77
mov ecx, dword [ebp + 0x1c]
mov edx, dword [esp + 0x3c]
push esi
push 0x72
add ecx, 2
push ebp
call fcn.1014f1b7
add esp, 0x20
mov esi, dword [ebp + 0x1c]
cmp dword [ebp + 0x20], esi
jg 0x10183d2c
mov edi, ebp
call fcn.101472c7
test eax, eax
mov edi, dword [esp + 0x58]
jne 0x10183d5c
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x38]
inc eax
mov dword [ebp + 0x1c], eax
lea eax, [esi + esi*4]
lea eax, [ecx + eax*4]
mov ecx, dword [esp + 0x5c]
mov dword [eax + 8], ecx
xor ecx, ecx
mov byte [eax], 2
mov byte [eax + 3], 0
mov dword [eax + 4], edx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov al, byte [edi + 0xd]
test al, al
je 0x10183d6b
mov dword [esp + 0x60], 1
mov eax, dword [edi + 0x38]
test eax, 0xf0000
je 0x10183d96
test eax, 0x20000000
jne 0x10183d96
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x10183d8d
mov edx, dword [edi + 0x48]
cmp edx, dword [esp + 0x30]
jne 0x10183d96
mov eax, dword [edi + 0x48]
mov dword [esp + 0x30], eax
jmp 0x10183d9e
mov dword [esp + 0x30], 0
push edi
call fcn.1014b547
mov esi, dword [esp + 0x24]
add esp, 4
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0x18]
inc ecx
add edi, 0x28
cmp ecx, edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], edi
jl 0x10183c47
mov eax, dword [esp + 0x30]
test eax, eax
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0x40], eax
je 0x10183de4
mov edx, dword [esp + 0x50]
mov dword [ecx + 0x20], edx
test esi, esi
je 0x10183dfb
mov dword [esi + 8], 0
mov eax, dword [ebx]
push esi
push eax
call fcn.10148957
add esp, 8
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x48]
cmp eax, ecx
jbe 0x10183e10
mov edx, dword [ebp + 4]
lea ecx, [ecx + ecx*4]
mov dword [edx + ecx*4 + 4], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x24]
mov esi, dword [ebp + 0x1c]
cmp dword [ebp + 0x20], esi
mov dword [esp + 0x70], ecx
jg 0x10183e2e
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10183e56
inc dword [ebp + 0x1c]
mov eax, dword [ebp + 4]
lea edx, [esi + esi*4]
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x70]
xor ecx, ecx
mov byte [eax], 1
mov byte [eax + 3], 0
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x10183e6f
mov ecx, dword [esp + 0x5c]
lea edx, [ecx*4 + 4]
mov ecx, dword [ebp + 0x1c]
sub eax, edx
mov dword [eax], ecx
mov edx, dword [esp + 0x6c]
cmp dword [edx + 0x1c], 1
jle 0x10183e84
mov eax, dword [esp + 0x34]
mov ecx, dword [ebx]
call fcn.101394e7
mov eax, dword [esp + 0x60]
test eax, eax
jne 0x10183ed1
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x14]
call fcn.10141ea7
jmp 0x10183ed1
mov ecx, dword [esp + 0x20]
mov al, byte [ecx + 0x10183c24]
mov edx, dword [esp + 0x30]
mov byte [esi + 0x35], al
mov eax, dword [esp + 0x10]
push 0
mov dword [esi + 0x38], eax
movzx ecx, byte [ecx + 0x10183c28]
push edx
push eax
push ecx
mov eax, ebp
call fcn.10147347
add esp, 0x10
inc eax
mov dword [esi + 0x3c], eax
mov byte [esi + 0x36], 1
mov esi, dword [esp + 0x1c]
mov edx, dword [esi + 4]
mov eax, dword [edx]
xor ecx, ecx
test eax, eax
jle 0x10183ef3
mov edi, dword [esp + 0x10]
add edx, 4
cmp dword [edx], edi
je 0x10183f4d
inc ecx
add edx, 4
cmp ecx, eax
jl 0x10183ee7
xor eax, eax
xor edx, edx
mov ecx, dword [esp + 0x78]
mov edi, dword [esp + 0x7c]
not eax
and ecx, eax
mov eax, dword [esi + 0x18]
not edx
and edi, edx
test eax, eax
mov dword [esp + 0x7c], edi
mov edi, dword [esi + 0x20]
mov dword [esp + 0x78], ecx
jle 0x10183f91
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x70], eax
lea ebx, [ebx]
test byte [edi + 0x12], 6
jne 0x10183f83
mov ecx, dword [esp + 0x78]
mov eax, dword [edi + 0x20]
mov edx, dword [esp + 0x7c]
and eax, ecx
mov ecx, dword [edi + 0x24]
and ecx, edx
or eax, ecx
je 0x10183f5b
mov eax, dword [esp + 0x6c]
mov byte [eax + 0xd], 1
jmp 0x10183f83
mov eax, 1
xor edx, edx
call fcn.101aa457
jmp 0x10183ef7
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x18]
test edx, edx
mov eax, dword [edi]
je 0x10183f6e
test byte [eax + 2], 1
je 0x10183f83
push 8
push esi
push eax
push ebx
call fcn.1017e097
mov al, byte [edi + 0x12]
add esp, 0x10
or al, 4
mov byte [edi + 0x12], al
mov eax, dword [esp + 0x70]
add edi, 0x28
dec eax
mov dword [esp + 0x70], eax
jne 0x10183f27
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x10184049
mov edx, dword [ebp + 0x1c]
mov dword [eax + 0x30], edx
mov esi, dword [ebp + 0x1c]
mov eax, ecx
mov dword [esp + 0x6c], eax
cmp dword [ebp + 0x20], esi
jg 0x10183fbf
mov edi, ebp
call fcn.101472c7
test eax, eax
jne 0x10183fef
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 4]
inc eax
mov dword [ebp + 0x1c], eax
lea ecx, [esi + esi*4]
lea eax, [edx + ecx*4]
mov ecx, dword [esp + 0x6c]
mov dword [eax + 8], ecx
xor ecx, ecx
mov byte [eax], 7
mov byte [eax + 3], 0
mov dword [eax + 4], 1
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov byte [eax + 1], cl
mov edx, ebx
call fcn.1013fbf7
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp + 0x20]
xor esi, esi
test eax, eax
jle 0x10184049
nop
test byte [edi + 0x12], 6
jne 0x1018403e
mov ecx, dword [esp + 0x78]
mov eax, dword [edi + 0x20]
mov edx, dword [esp + 0x7c]
and eax, ecx
mov ecx, dword [edi + 0x24]
and ecx, edx
or eax, ecx
jne 0x1018403e
mov edx, dword [esp + 0x4c]
mov eax, dword [edi]
push 8
push edx
push eax
push ebx
call fcn.1017e097
mov al, byte [edi + 0x12]
add esp, 0x10
or al, 4
mov byte [edi + 0x12], al
mov eax, dword [ebp + 0x18]
inc esi
add edi, 0x28
cmp esi, eax
jl 0x10184007
mov esi, dword [esp + 0x24]
test esi, esi
je 0x10184076
mov dl, byte [ebx + 0x13]
cmp dl, 8
jae 0x10184076
xor eax, eax
lea ecx, [ebx + 0x64]
cmp dword [ecx + 0x10], esi
je 0x10184086
inc eax
add ecx, 0x18
cmp eax, 0xa
jl 0x1018405e
movzx ecx, dl
mov dword [ebx + ecx*4 + 0x1c], esi
inc byte [ebx + 0x13]
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
mov byte [ecx + 8], 1
pop ebx
add esp, 0x58
ret