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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [esp + 0x70]
mov eax, dword [ebx + 4]
and eax, 0x7ff
mov dword [esp + 0x1c], eax
dec dword [esp + 0x7c]
cmp dword [esp + 0x7c], 0xffffffff
je 0x629b05d7
mov eax, dword [esp + 0x74]
movsx edx, word [ebx + 0x22]
mov eax, dword [eax]
mov word [esp + 0x40], ax
mov eax, dword [esp + 0x74]
add dword [esp + 0x74], 4
mov ax, word [eax + 2]
mov word [esp + 0x44], ax
mov eax, dword [esp + 0x1c]
lea eax, [eax*4 + 0x7d8]
and eax, 0x1ffc
add eax, ebx
movsx edi, word [eax + 0x6042]
movsx ecx, word [eax + 0x6040]
mov eax, dword [esp + 0x1c]
sub edx, edi
lea eax, [eax*4 + 0x58]
and eax, 0x1ffc
add eax, ebx
movsx esi, word [eax + 0x6040]
movsx eax, word [eax + 0x6042]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
sub eax, 0x12a
mov dword [esp + 0x20], esi
and eax, 0x7ff
movsx eax, word [ebx + eax*4 + 0x40]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
sub eax, 0x1be
and eax, 0x7ff
movsx eax, word [ebx + eax*4 + 0x42]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
sub eax, 0x34a
and eax, 0x7ff
movsx eax, word [ebx + eax*4 + 0x2040]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1c]
sub eax, 0x50e
and eax, 0x7ff
cmp edx, 0x7fff
movsx eax, word [ebx + eax*4 + 0x2042]
mov dword [esp + 0x3c], eax
jle 0x629aff2a
mov edx, 0x7fff
jmp 0x629aff37
cmp edx, 0xffff8000
jge 0x629aff37
mov edx, 0xffff8000
movsx eax, word [ebx + 0x1a]
imul eax, edx
mov esi, 0x10000
cdq
idiv esi
movsx edx, word [ebx + 0x24]
sub edx, dword [esp + 0x20]
mov dword [esp + 0x30], eax
cmp edx, 0x7fff
jle 0x629aff61
mov edx, 0x7fff
jmp 0x629aff6e
cmp edx, 0xffff8000
jge 0x629aff6e
mov edx, 0xffff8000
movsx eax, word [ebx + 0x1c]
imul eax, edx
mov esi, 0x10000
cdq
idiv esi
movsx edx, word [ebx + 0x26]
sub edx, dword [esp + 0x24]
mov dword [esp + 0x34], eax
cmp edx, 0x7fff
jle 0x629aff98
mov edx, 0x7fff
jmp 0x629affa5
cmp edx, 0xffff8000
jge 0x629affa5
mov edx, 0xffff8000
movsx ebp, word [ebx + 0x1e]
imul ebp, edx
mov eax, ebp
mov esi, 0x10000
cdq
idiv esi
mov ebp, eax
movsx eax, word [ebx + 0x20]
sub eax, ecx
cmp eax, 0x7fff
jle 0x629affcc
mov eax, 0x7fff
jmp 0x629affd8
cmp eax, 0xffff8000
jge 0x629affd8
mov eax, 0xffff8000
movsx edx, word [ebx + 0x18]
imul eax, edx
mov esi, 0x10000
cdq
idiv esi
add eax, eax
cmp eax, 0x7fff
jle 0x629afff5
mov eax, 0x7fff
add eax, ecx
mov dword [esp], eax
call method.short_mpt::mpt_libopenmpt.saturate_cast_short__int__int_
mov edx, dword [esp + 0x30]
add edx, edx
mov esi, eax
mov word [ebx + 0x20], ax
cmp edx, 0x7fff
jle 0x629b0018
mov edx, 0x7fff
add edi, edx
mov dword [esp], edi
call method.short_mpt::mpt_libopenmpt.saturate_cast_short__int__int_
mov edx, dword [esp + 0x34]
add edx, edx
mov word [ebx + 0x22], ax
cmp edx, 0x7fff
jle 0x629b0039
mov edx, 0x7fff
add edx, dword [esp + 0x20]
add ebp, ebp
mov dword [esp], edx
call method.short_mpt::mpt_libopenmpt.saturate_cast_short__int__int_
cmp ebp, 0x7fff
mov word [ebx + 0x24], ax
jle 0x629b0058
mov ebp, 0x7fff
add ebp, dword [esp + 0x24]
mov edi, 0x7fff
mov dword [esp], ebp
call method.short_mpt::mpt_libopenmpt.saturate_cast_short__int__int_
movsx edx, word [ebx + 0x10]
mov ecx, eax
mov word [ebx + 0x26], ax
movsx eax, si
imul eax, edx
cmp eax, 0x40000000
je 0x629b008a
mov edi, 0x8000
cdq
idiv edi
mov edi, eax
movsx edx, word [ebx + 0x16]
movsx eax, cx
imul eax, edx
mov ebp, 0x7fff
cmp eax, 0x40000000
je 0x629b00aa
mov esi, 0x8000
cdq
idiv esi
mov ebp, eax
mov eax, dword [esp + 0x40]
mov ecx, 4
mov edx, eax
sar dx, 0xf
idiv cx
cwde
add eax, edi
mov dword [esp + 0x20], eax
cmp eax, 0x7fff
jle 0x629b00d4
mov dword [esp + 0x20], 0x7fff
jmp 0x629b00e6
cmp dword [esp + 0x20], 0xffff8000
jge 0x629b00e6
mov dword [esp + 0x20], 0xffff8000
mov eax, dword [esp + 0x44]
mov ecx, 4
mov edx, eax
sar dx, 0xf
idiv cx
cwde
lea edi, [eax + ebp]
cmp edi, 0x7fff
jle 0x629b010b
mov edi, 0x7fff
jmp 0x629b0118
cmp edi, 0xffff8000
jge 0x629b0118
mov edi, 0xffff8000
movsx eax, word [ebx + 8]
mov dword [esp + 0x30], eax
mov ecx, 0x10000
imul eax, dword [esp + 0x28]
cdq
idiv ecx
mov esi, dword [esp + 0x20]
sub esi, eax
cmp esi, 0x7fff
jle 0x629b0142
mov esi, 0x7fff
jmp 0x629b014f
cmp esi, 0xffff8000
jge 0x629b014f
mov esi, 0xffff8000
movsx eax, word [ebx + 0xa]
mov dword [esp + 0x34], eax
mov ecx, 0x10000
imul eax, dword [esp + 0x2c]
cdq
idiv ecx
mov ecx, edi
sub ecx, eax
cmp ecx, 0x7fff
jle 0x629b0177
mov ecx, 0x7fff
jmp 0x629b0184
cmp ecx, 0xffff8000
jge 0x629b0184
mov ecx, 0xffff8000
mov eax, dword [esp + 0x1c]
lea ebp, [ebx + eax*4]
mov eax, dword [esp + 0x30]
imul eax, esi
mov word [ebp + 0x40], si
mov esi, 0x10000
cdq
idiv esi
mov esi, dword [esp + 0x28]
mov word [ebp + 0x42], cx
add esi, eax
cmp esi, 0x7fff
jle 0x629b01b7
mov esi, 0x7fff
jmp 0x629b01c4
cmp esi, 0xffff8000
jge 0x629b01c4
mov esi, 0xffff8000
mov eax, dword [esp + 0x34]
imul eax, ecx
mov ecx, 0x10000
cdq
idiv ecx
add eax, dword [esp + 0x2c]
cmp eax, 0x7fff
jle 0x629b01e5
mov eax, 0x7fff
jmp 0x629b01f1
cmp eax, 0xffff8000
jge 0x629b01f1
mov eax, 0xffff8000
mov word [ebp + 0x4040], si
add esi, dword [esp + 0x20]
mov word [ebp + 0x4042], ax
mov dword [esp + 0x24], esi
cmp esi, 0x7fff
jle 0x629b0219
mov dword [esp + 0x24], 0x7fff
jmp 0x629b022b
cmp dword [esp + 0x24], 0xffff8000
jge 0x629b022b
mov dword [esp + 0x24], 0xffff8000
add edi, eax
cmp edi, 0x7fff
jle 0x629b023c
mov edi, 0x7fff
jmp 0x629b0249
cmp edi, 0xffff8000
jge 0x629b0249
mov edi, 0xffff8000
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], 0xffff8000
movsx edx, word [ebx + 0x2a]
lea eax, [eax*4 + 0xaa8]
and eax, 0x1ffc
add eax, ebx
movsx esi, word [eax + 0x4040]
movsx eax, word [eax + 0x4042]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x1c]
imul edx, dword [esp + 0x44]
lea eax, [eax*4 + 0x6a8]
mov dword [esp + 0x40], esi
and eax, 0x1ffc
add eax, ebx
movsx ecx, word [eax + 0x4040]
movsx eax, word [eax + 0x4042]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], ecx
movsx eax, word [ebx + 0x28]
imul eax, esi
lea eax, [eax + edx]
cmp eax, 0xbfff8001
jl 0x629b02d6
mov dword [esp + 0x28], 0x7fff
cmp eax, 0x3fffffff
jg 0x629b02d6
mov ecx, 0x8000
cdq
idiv ecx
mov dword [esp + 0x28], eax
movsx eax, word [ebx + 0x2c]
movsx edx, word [ebx + 0x2e]
imul eax, dword [esp + 0x48]
imul edx, dword [esp + 0x4c]
mov dword [esp + 0x2c], 0xffff8000
lea eax, [eax + edx]
cmp eax, 0xbfff8001
jl 0x629b0315
mov dword [esp + 0x2c], 0x7fff
cmp eax, 0x3fffffff
jg 0x629b0315
mov ecx, 0x8000
cdq
idiv ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x30]
mov ecx, 0x10000
imul eax, dword [esp + 0x38]
cdq
idiv ecx
mov esi, dword [esp + 0x28]
sub esi, eax
cmp esi, 0x7fff
jle 0x629b033b
mov esi, 0x7fff
jmp 0x629b0348
cmp esi, 0xffff8000
jge 0x629b0348
mov esi, 0xffff8000
mov eax, dword [esp + 0x34]
mov ecx, 0x10000
imul eax, dword [esp + 0x3c]
cdq
idiv ecx
mov ecx, dword [esp + 0x2c]
sub ecx, eax
mov dword [esp + 0x20], ecx
cmp ecx, 0x7fff
jle 0x629b0375
mov dword [esp + 0x20], 0x7fff
jmp 0x629b0387
cmp dword [esp + 0x20], 0xffff8000
jge 0x629b0387
mov dword [esp + 0x20], 0xffff8000
mov eax, dword [esp + 0x30]
mov ecx, 0x10000
imul eax, esi
cdq
idiv ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x34]
imul eax, dword [esp + 0x20]
cdq
idiv ecx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x34], eax
add edx, dword [esp + 0x30]
mov eax, dword [esp + 0x20]
mov word [ebp + 0x2040], si
mov word [ebp + 0x2042], ax
cmp edx, 0x7fff
jle 0x629b03d3
mov edx, 0x7fff
jmp 0x629b03e0
cmp edx, 0xffff8000
jge 0x629b03e0
mov edx, 0xffff8000
mov ecx, dword [esp + 0x3c]
add ecx, dword [esp + 0x34]
cmp ecx, 0x7fff
jle 0x629b03f7
mov ecx, 0x7fff
jmp 0x629b0404
cmp ecx, 0xffff8000
jge 0x629b0404
mov ecx, 0xffff8000
mov eax, dword [esp + 0x1c]
mov word [ebp + 0x6040], dx
inc eax
mov word [ebp + 0x6042], cx
and eax, 0x7ff
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
add eax, dword [esp + 0x24]
cmp eax, 0x7fff
jle 0x629b0436
mov eax, 0x7fff
jmp 0x629b0442
cmp eax, 0xffff8000
jge 0x629b0442
mov eax, 0xffff8000
sub eax, dword [esp + 0x28]
cmp eax, 0x7fff
jle 0x629b0454
mov eax, 0x7fff
jmp 0x629b0460
cmp eax, 0xffff8000
jge 0x629b0460
mov eax, 0xffff8000
add eax, edx
cmp eax, 0x7fff
jle 0x629b0470
mov eax, 0x7fff
jmp 0x629b047c
cmp eax, 0xffff8000
jge 0x629b047c
mov eax, 0xffff8000
movsx edx, word [ebx + 0x30]
imul eax, edx
mov edx, dword [esp + 0x44]
add edx, edi
cmp edx, 0x7fff
jle 0x629b0498
mov edx, 0x7fff
jmp 0x629b04a5
cmp edx, 0xffff8000
jge 0x629b04a5
mov edx, 0xffff8000
sub edx, dword [esp + 0x2c]
cmp edx, 0x7fff
jle 0x629b04b8
mov edx, 0x7fff
jmp 0x629b04c5
cmp edx, 0xffff8000
jge 0x629b04c5
mov edx, 0xffff8000
add edx, ecx
cmp edx, 0x7fff
jle 0x629b04d6
mov edx, 0x7fff
jmp 0x629b04e3
cmp edx, 0xffff8000
jge 0x629b04e3
mov edx, 0xffff8000
movsx ecx, word [ebx + 0x32]
imul edx, ecx
add edx, eax
mov eax, dword [esp + 0x78]
add dword [eax], edx
mov eax, dword [esp + 0x48]
add eax, dword [esp + 0x24]
cmp eax, 0x7fff
jle 0x629b0508
mov eax, 0x7fff
jmp 0x629b0514
cmp eax, 0xffff8000
jge 0x629b0514
mov eax, 0xffff8000
sub eax, dword [esp + 0x28]
mov esi, eax
cmp eax, 0x7fff
jle 0x629b0528
mov esi, 0x7fff
jmp 0x629b0534
cmp eax, 0xffff8000
jge 0x629b0534
mov esi, 0xffff8000
mov eax, dword [esp + 0x30]
add eax, esi
cmp eax, 0x7fff
jle 0x629b0548
mov eax, 0x7fff
jmp 0x629b0554
cmp eax, 0xffff8000
jge 0x629b0554
mov eax, 0xffff8000
movsx edx, word [ebx + 0x34]
imul eax, edx
mov edx, dword [esp + 0x4c]
add edx, edi
cmp edx, 0x7fff
jle 0x629b0570
mov edx, 0x7fff
jmp 0x629b057d
cmp edx, 0xffff8000
jge 0x629b057d
mov edx, 0xffff8000
sub edx, dword [esp + 0x2c]
cmp edx, 0x7fff
jle 0x629b0590
mov edx, 0x7fff
jmp 0x629b059d
cmp edx, 0xffff8000
jge 0x629b059d
mov edx, 0xffff8000
add edx, dword [esp + 0x34]
cmp edx, 0x7fff
jle 0x629b05b0
mov edx, 0x7fff
jmp 0x629b05bd
cmp edx, 0xffff8000
jge 0x629b05bd
mov edx, 0xffff8000
movsx edi, word [ebx + 0x36]
imul edx, edi
add edx, eax
mov eax, dword [esp + 0x78]
add dword [esp + 0x78], 8
add dword [eax + 4], edx
jmp 0x629afe3f
mov eax, dword [esp + 0x1c]
mov dword [ebx + 4], eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret