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

Disassembly:
sub esp, 0x44
push ebx
mov ebx, dword [esp + 0x4c]
mov eax, dword [ebx + 0x18]
push ebp
push esi
push edi
mov edi, dword [esp + 0x64]
mov ecx, edi
imul ecx, ecx, 0x350
mov edx, edi
imul edx, edx, 0x15d4
mov dword [ebx + 0x2c], edi
add ecx, dword [eax + 8]
mov eax, dword [ebx + 0x20]
mov dword [ebx + 0x24], ecx
add edx, dword [eax + 0x6c]
mov ebp, ecx
mov dword [esp + 0x40], 0
mov dword [ebx + 0x28], edx
mov dword [esp + 0x2c], ebp
call fcn.00472100
mov eax, dword [ebx + 0x20]
mov ecx, dword [eax + 0x48]
fstp qword [esp + 0x4c]
imul ecx, dword [eax + 0x44]
mov eax, dword [ebx + 0x14]
push ecx
lea edx, [edi + 1]
push edx
push str.tile__d_of__d_n
push 4
push eax
call fcn.004649a0
mov esi, dword [esp + 0x7c]
xor ecx, ecx
add esp, 0x14
cmp esi, ecx
je 0x46df4c
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], ecx
cmp dword [esi + 0x34], ecx
jle 0x46df1b
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ecx
jmp 0x46de28
xor ecx, ecx
mov edx, dword [ebx + 0x20]
mov eax, dword [edx + 0x6c]
mov edx, dword [ebp + 0x14]
mov eax, dword [eax + 0x15d0]
add eax, dword [esp + 0x14]
add edx, dword [esp + 0x18]
xor edi, edi
mov dword [esp + 0x3c], eax
cmp dword [edx + 0x10], edi
jle 0x46def8
mov ecx, dword [esp + 0x64]
lea ecx, [ecx + ecx*8]
shl ecx, 4
add eax, 0x3b0
mov dword [esp + 0x38], ecx
mov dword [esp + 0x10], edi
lea ecx, [ecx*4 + 0x11c]
mov dword [esp + 0x68], eax
mov eax, dword [edx + 0x14]
add eax, dword [esp + 0x10]
mov ebx, dword [esi + 0x58]
mov ebp, dword [eax + 0x10]
mov dword [ebx + ecx - 0x108], ebp
mov ebx, dword [esi + 0x58]
mov ebp, dword [eax + 0x14]
mov dword [ecx + ebx - 0x84], ebp
mov ebx, dword [eax + 0x14]
imul ebx, dword [eax + 0x10]
mov eax, dword [esp + 0x3c]
add dword [esp + 0x1c], ebx
test byte [eax], 1
je 0x46dec9
mov eax, dword [esp + 0x68]
mov ebp, dword [eax - 0x84]
mov ebx, dword [esi + 0x58]
mov dword [ecx + ebx], ebp
mov ebx, dword [esp + 0x38]
mov ebp, dword [esi + 0x58]
mov eax, dword [eax]
add ebx, edi
mov dword [ebp + ebx*4 + 0x1a0], eax
jmp 0x46dedd
mov eax, dword [esi + 0x58]
mov dword [ecx + eax], 0xf
mov eax, dword [esi + 0x58]
mov dword [ecx + eax], 0xf
add dword [esp + 0x68], 4
add dword [esp + 0x10], 0x7c
inc edi
add ecx, 4
cmp edi, dword [edx + 0x10]
jl 0x46de70
mov ebp, dword [esp + 0x2c]
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x28]
add dword [esp + 0x14], 0x434
add dword [esp + 0x18], 0x20
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esi + 0x34]
jl 0x46de26
mov edi, dword [esp + 0x64]
mov eax, dword [esi + 0x38]
imul eax, dword [esp + 0x1c]
lea ecx, [eax + eax*2]
add ecx, ecx
add ecx, ecx
add ecx, ecx
push ecx
call sub.MSVCRT.dll_malloc
mov ecx, dword [esi + 0x58]
lea edx, [edi + edi*8]
add esp, 4
shl edx, 6
mov dword [edx + ecx + 0x224], eax
mov dword [esi + 8], 0
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x1c]
mov ecx, dword [ebx + 0x14]
push edx
push eax
push ecx
call fcn.004720b0
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
push esi
push ebp
push edi
push edx
push ecx
push eax
mov dword [esp + 0x88], eax
call fcn.00471e00
mov edx, dword [esp + 0x88]
push edx
mov esi, eax
call fcn.004720e0
add esp, 0x28
cmp esi, 0xfffffc19
jne 0x46dfac
mov eax, dword [ebx + 0x14]
push str.tcd_decode:_incomplete_bistream_n
push 1
push eax
mov dword [esp + 0x4c], 1
call fcn.004649a0
add esp, 0xc
call fcn.00472100
fstp qword [esp + 0x44]
mov ecx, dword [ebx + 0x14]
push ecx
call fcn.004740a0
mov dword [esp + 0x2c], eax
xor eax, eax
add esp, 4
xor edi, edi
cmp dword [ebp + 0x10], eax
jle 0x46e02c
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], eax
mov esi, dword [ebp + 0x14]
add esi, dword [esp + 0x64]
push 0x10
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
sub edx, dword [esi + 4]
sub eax, dword [esi]
imul edx, eax
lea ecx, [edx*4 + 0xc]
push ecx
call fcn.0049dfef
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x18], eax
mov edx, dword [ebx + 0x28]
mov eax, dword [edx + 0x15d0]
add eax, dword [esp + 0x70]
push eax
push esi
push ecx
call fcn.004744a0
add dword [esp + 0x78], 0x20
add dword [esp + 0x7c], 0x434
inc edi
add esp, 0x14
cmp edi, dword [ebp + 0x10]
jl 0x46dfd6
mov edx, dword [esp + 0x28]
push edx
call fcn.004740e0
call fcn.00472100
fsub qword [esp + 0x48]
mov eax, dword [ebx + 0x14]
push ecx
fstp qword [esp]
push str.__tiers_1_took__f_s_n
push 4
push eax
call fcn.004649a0
add esp, 0x14
call fcn.00472100
fstp qword [esp + 0x44]
xor ecx, ecx
xor esi, esi
cmp dword [ebp + 0x10], ecx
jle 0x46e105
mov dword [esp + 0x64], ecx
xor edi, edi
mov dword [esp + 0x28], ecx
mov eax, dword [ebx + 0x20]
add ecx, dword [ebp + 0x14]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x68], ecx
test eax, eax
je 0x46e0a8
mov ecx, dword [ecx + 0x10]
mov edx, dword [ebx + 0x1c]
sub ecx, eax
mov eax, dword [edx + 0x18]
dec ecx
mov dword [eax + edi + 0x24], ecx
mov ecx, dword [ebx + 0x1c]
mov edx, dword [ecx + 0x18]
cmp dword [edx + edi + 0x24], 0
jl 0x46e166
mov eax, dword [ebx + 0x1c]
mov ecx, dword [eax + 0x18]
mov eax, dword [ecx + edi + 0x24]
inc eax
test eax, eax
jle 0x46e0e5
mov edx, dword [ebx + 0x28]
mov ecx, dword [edx + 0x15d0]
mov edx, dword [esp + 0x64]
cmp dword [ecx + edx + 0x14], 1
push eax
jne 0x46e0d8
mov eax, dword [esp + 0x6c]
push eax
call fcn.004706d0
jmp 0x46e0e2
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.004702d0
add esp, 8
mov ecx, dword [esp + 0x28]
add dword [esp + 0x64], 0x434
inc esi
add ecx, 0x20
add edi, 0x30
mov dword [esp + 0x28], ecx
cmp esi, dword [ebp + 0x10]
jl 0x46e076
call fcn.00472100
fsub qword [esp + 0x44]
mov ecx, dword [ebx + 0x14]
sub esp, 8
fstp qword [esp]
push str.__dwt_took__f_s_n
push 4
push ecx
call fcn.004649a0
mov edx, dword [ebx + 0x28]
xor esi, esi
add esp, 0x14
cmp dword [edx + 0x10], esi
je 0x46e1a9
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0xc]
mov edi, dword [ecx + 8]
sub eax, dword [ecx + 4]
sub edi, dword [ecx]
mov edx, dword [edx + 0x15d0]
imul eax, edi
cmp dword [edx + 0x14], 1
push eax
jne 0x46e195
mov eax, dword [ecx + 0x58]
mov edx, dword [ecx + 0x38]
push eax
mov eax, dword [ecx + 0x18]
push edx
push eax
call fcn.004721a0
jmp 0x46e1a6
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebx + 0x20]
shl esi, 5
mov eax, dword [esi + edx + 0x10]
mov edx, dword [ecx + 0x24]
push eax
mov eax, dword [ebx + 0x14]
push edx
push str.Error_decoding_tile._The_number_of_resolutions_to_remove___d1__is_higher_than_the_number__of_resolutions_in_the_original_codestream___d__nModify_the_cp_reduce_parameter._n
push 1
push eax
call fcn.004649a0
add esp, 0x14
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret
mov edx, dword [ecx + 0x58]
mov eax, dword [ecx + 0x38]
mov ecx, dword [ecx + 0x18]
push edx
push eax
push ecx
call fcn.00472460
add esp, 0x10
mov dword [esp + 0x3c], esi
cmp dword [ebp + 0x10], esi
jle 0x46e403
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
jmp 0x46e1c6
mov ebp, ecx
mov eax, dword [ebx + 0x1c]
mov edi, dword [eax + 0x18]
add edi, dword [esp + 0x24]
mov edx, dword [ebp + 0x14]
mov esi, dword [edi + 0x24]
add edx, dword [esp + 0x20]
imul esi, esi, 0x7c
mov eax, dword [edi + 0x20]
add esi, dword [edx + 0x14]
xor ebp, ebp
mov dword [esp + 0x10], edx
cmp eax, ebp
je 0x46e1f3
mov dword [esp + 0x1c], ebp
jmp 0x46e202
mov ecx, dword [edi + 0x18]
dec ecx
mov ebx, 1
shl ebx, cl
mov dword [esp + 0x1c], ebx
cmp eax, ebp
je 0x46e215
mov ecx, dword [edi + 0x18]
dec ecx
or ebx, 0xffffffff
shl ebx, cl
mov dword [esp + 0x18], ebx
jmp 0x46e219
mov dword [esp + 0x18], ebp
mov ecx, dword [edi + 0x18]
cmp eax, ebp
mov eax, 1
je 0x46e226
dec ecx
mov ebx, dword [edi + 0x10]
shl eax, cl
mov ecx, dword [edi + 8]
mov ebp, dword [edi + 0x14]
mov dword [esp + 0x68], ecx
mov ecx, dword [edi + 0x28]
dec eax
mov dword [esp + 0x14], eax
mov eax, dword [edx + 8]
sub eax, dword [edx]
mov dword [esp + 0x34], eax
mov eax, 1
shl eax, cl
lea ebx, [eax + ebx - 1]
mov eax, 1
shl eax, cl
sar ebx, cl
lea ebp, [eax + ebp - 1]
sar ebp, cl
cmp dword [edi + 0x2c], 0
jne 0x46e282
mov ecx, dword [edi + 0xc]
imul ecx, dword [esp + 0x68]
add ecx, ecx
add ecx, ecx
push ecx
call sub.MSVCRT.dll_malloc
mov edx, dword [esp + 0x14]
add esp, 4
mov dword [edi + 0x2c], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [eax + 0x28]
mov eax, dword [ecx + 0x15d0]
mov ecx, dword [esp + 0x28]
cmp dword [eax + ecx + 0x14], 1
mov ecx, dword [esi + 4]
mov dword [esp + 0x64], ecx
jne 0x46e330
cmp ecx, dword [esi + 0xc]
jge 0x46e3c9
mov eax, dword [esi + 8]
mov edx, ecx
sub edx, ebp
imul edx, dword [esp + 0x68]
sub edx, ebx
mov dword [esp + 0x30], edx
mov ecx, dword [esi]
cmp ecx, eax
jge 0x46e315
add edx, ecx
add edx, edx
add edx, edx
lea esp, [esp]
mov eax, dword [esp + 0x64]
sub eax, dword [esi + 4]
mov ebx, dword [esp + 0x10]
imul eax, dword [esp + 0x34]
sub eax, dword [esi]
mov ebx, dword [ebx + 0x18]
add eax, ecx
mov eax, dword [ebx + eax*4]
add eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
cmp eax, ebx
jl 0x46e2fe
mov ebx, dword [esp + 0x14]
cmp eax, ebx
jle 0x46e300
mov eax, ebx
mov ebx, dword [edi + 0x2c]
mov dword [edx + ebx], eax
mov eax, dword [esi + 8]
inc ecx
add edx, 4
cmp ecx, eax
jl 0x46e2d0
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x64]
add edx, dword [esp + 0x68]
inc ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x30], edx
cmp ecx, dword [esi + 0xc]
jl 0x46e2c0
jmp 0x46e3c5
cmp ecx, dword [esi + 0xc]
jge 0x46e3c9
mov edx, ecx
sub edx, ebp
imul edx, dword [esp + 0x68]
sub edx, ebx
mov dword [esp + 0x30], edx
mov eax, dword [esi]
cmp eax, dword [esi + 8]
jge 0x46e3b3
add edx, eax
add edx, edx
add edx, edx
jmp 0x46e360
sub ecx, dword [esi + 4]
mov ebx, dword [esp + 0x10]
imul ecx, dword [esp + 0x34]
sub ecx, dword [esi]
mov ebx, dword [ebx + 0x18]
add ecx, eax
fld dword [ebx + ecx*4]
fstp dword [esp + 0x44]
fld dword [esp + 0x44]
fistp dword [esp + 0x38]
mov ecx, dword [esp + 0x38]
add ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
cmp ecx, ebx
jl 0x46e39a
mov ebx, dword [esp + 0x14]
cmp ecx, ebx
jle 0x46e39c
mov ecx, ebx
mov ebx, dword [edi + 0x2c]
mov dword [edx + ebx], ecx
mov ecx, dword [esp + 0x64]
inc eax
add edx, 4
cmp eax, dword [esi + 8]
jl 0x46e360
mov edx, dword [esp + 0x30]
add edx, dword [esp + 0x68]
inc ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x30], edx
cmp ecx, dword [esi + 0xc]
jl 0x46e348
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 0x18]
push edx
call fcn.0049e039
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x30]
add dword [esp + 0x24], 0x20
add dword [esp + 0x28], 0x30
add dword [esp + 0x2c], 0x434
mov ebx, dword [esp + 0x5c]
inc eax
add esp, 4
mov dword [esp + 0x3c], eax
cmp eax, dword [ecx + 0x10]
jl 0x46e1c4
xor esi, esi
call fcn.00472100
fsub qword [esp + 0x4c]
mov edx, dword [ebx + 0x14]
sub esp, 8
fstp qword [esp]
push str.__tile_decoded_in__f_s_n
push 4
push edx
call fcn.004649a0
add esp, 0x14
pop edi
xor eax, eax
cmp dword [esp + 0x3c], esi
pop esi
pop ebp
sete al
pop ebx
add esp, 0x44
ret