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

Disassembly:
sub esp, 0x4c
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
push ebx
push ebp
imul ecx, dword [edx + 0x1c], 0x4c
mov ebp, dword [edx + 0x24]
mov ebx, dword [edx + 0x28]
push esi
mov esi, dword [esp + 0x60]
push edi
imul edi, dword [edx + 0x20], 0x98
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x34], ebp
mov dword [esp + 0x24], ebx
add edi, dword [ecx + eax + 0x1c]
mov eax, dword [esp + 0x68]
mov dword [esp + 0x1c], edi
test byte [eax], 2
je 0x4bf458
mov ecx, dword [esp + 0x78]
cmp ecx, 6
jae 0x4bf42a
cmp dword [esp + 0x80], 1
jne 0x4bf420
push 6
push ecx
push str.opj_t2_encode_packet__:_only__u_bytes_remaining_in_output_buffer.__u_needed._n
push 1
push dword [esp + 0x94]
call fcn.004b1600
add esp, 0x14
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret
mov edx, dword [esp + 0x70]
sub ecx, 6
mov dword [esp + 0x14], ecx
mov dword [edx], 0x40091ff
movzx eax, byte [esi + 0x349]
mov byte [edx + 4], al
movzx eax, byte [esi + 0x348]
mov byte [edx + 5], al
lea eax, [edx + 6]
mov dword [esp + 0x10], eax
jmp 0x4bf460
mov eax, dword [esp + 0x78]
mov dword [esp + 0x14], eax
test ebx, ebx
jne 0x4bf52a
mov eax, dword [esp + 0x1c]
add edi, 0x1c
mov dword [esp + 0x6c], edi
mov dword [esp + 0x64], ebx
cmp dword [eax + 0x18], ebx
jbe 0x4bf528
push edi
call fcn.004b8260
add esp, 4
test eax, eax
jne 0x4bf507
lea ebx, [ebp*4]
add ebx, ebp
mov ebp, dword [edi + 0x14]
push dword [ebp + ebx*8 + 0x20]
call fcn.004c0f70
push dword [ebp + ebx*8 + 0x24]
call fcn.004c0f70
mov eax, dword [ebp + ebx*8 + 0x14]
add esp, 8
imul eax, dword [ebp + ebx*8 + 0x10]
xor esi, esi
mov dword [esp + 0x50], eax
test eax, eax
je 0x4bf503
xor edi, edi
jmp 0x4bf4d0
mov ecx, dword [ebp + ebx*8 + 0x18]
mov eax, dword [esp + 0x6c]
mov dword [ecx + edi + 0x28], 0
mov eax, dword [eax + 0x1c]
sub eax, dword [ecx + edi + 0x1c]
push eax
push esi
push dword [ebp + ebx*8 + 0x24]
call fcn.004c0fb0
inc esi
lea edi, [edi + 0x34]
add esp, 0xc
cmp esi, dword [esp + 0x50]
jb 0x4bf4d0
mov edi, dword [esp + 0x6c]
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x64]
add edi, 0x24
mov ecx, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], edi
cmp eax, dword [ecx + 0x18]
jb 0x4bf480
mov edi, ecx
jmp 0x4bf52a
mov edi, eax
call fcn.004d2120
mov ebx, eax
mov dword [esp + 0x64], ebx
test ebx, ebx
je 0x4bf420
mov ecx, dword [esp + 0x14]
push ecx
push dword [esp + 0x14]
push ebx
call fcn.004d2290
push 1
push 1
push ebx
call fcn.004d2390
lea eax, [edi + 0x1c]
add esp, 0x18
mov dword [esp + 0x44], eax
xor ecx, ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x40], eax
cmp ecx, dword [edi + 0x18]
jae 0x4bf856
push eax
call fcn.004b8260
add esp, 4
test eax, eax
jne 0x4bf841
mov ebx, dword [esp + 0x40]
lea edx, [ebp*4]
add edx, ebp
xor edi, edi
mov dword [esp + 0x38], edx
mov ebx, dword [ebx + 0x14]
mov dword [esp + 0x48], ebx
mov ebp, dword [ebx + edx*8 + 0x14]
imul ebp, dword [ebx + edx*8 + 0x10]
mov esi, dword [ebx + edx*8 + 0x18]
mov dword [esp + 0x54], ebp
test ebp, ebp
je 0x4bf5e8
add esi, 4
cmp dword [esi + 0x24], 0
jne 0x4bf5e0
mov eax, dword [esp + 0x24]
lea ecx, [eax + eax*2]
mov eax, dword [esi]
cmp dword [eax + ecx*8], 0
je 0x4bf5e0
push dword [esp + 0x24]
push edi
push dword [ebx + edx*8 + 0x20]
call fcn.004c0fb0
mov edx, dword [esp + 0x44]
add esp, 0xc
inc edi
add esi, 0x34
cmp edi, ebp
jb 0x4bf5b6
mov eax, dword [ebx + edx*8 + 0x18]
mov dword [esp + 0x30], 0
test ebp, ebp
je 0x4bf83d
mov ecx, dword [esp + 0x24]
lea ebx, [eax + 0x20]
lea edx, [eax + 8]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], edx
lea ebp, [ecx + ecx*2]
shl ebp, 3
lea ecx, [eax + 0x28]
add eax, 4
mov dword [esp + 0x58], ebp
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x2c], eax
mov edx, dword [eax]
xor esi, esi
add edx, ebp
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x3c], edx
mov dword [esp + 0x4c], ebp
cmp dword [ecx], esi
jne 0x4bf660
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x48]
inc eax
push eax
mov eax, dword [esp + 0x3c]
push dword [esp + 0x34]
push dword [ecx + eax*8 + 0x20]
push dword [esp + 0x70]
call fcn.004c0ce0
add esp, 0x10
jmp 0x4bf676
xor eax, eax
cmp dword [edx], eax
push 1
setne al
push eax
push dword [esp + 0x6c]
call fcn.004d2390
add esp, 0xc
mov eax, dword [esp + 0x3c]
cmp dword [eax], esi
jne 0x4bf69b
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x6c]
add eax, 0x34
add dword [esp + 0x20], 0x34
add ecx, 0x34
add dword [esp + 0x18], 0x34
jmp 0x4bf81a
mov eax, dword [esp + 0x6c]
cmp dword [eax], esi
jne 0x4bf6ca
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x48]
push 0x3e7
push dword [esp + 0x34]
mov dword [ebx], 3
push dword [ecx + eax*8 + 0x24]
push dword [esp + 0x70]
call fcn.004c0ce0
add esp, 0x10
mov ebx, dword [esp + 0x3c]
push dword [ebx]
push dword [esp + 0x68]
call fcn.004bff50
mov eax, dword [esp + 0x74]
add esp, 8
mov ebx, dword [ebx]
mov ecx, dword [esp + 0x20]
mov edx, dword [eax]
add ebx, edx
mov dword [esp + 0x28], ebx
mov ecx, dword [ecx]
lea eax, [edx + edx*2]
cmp edx, ebx
jae 0x4bf75b
lea ebx, [eax*8 + 0x14]
mov eax, dword [esp + 0x28]
add ebx, ecx
add edi, dword [ebx - 4]
inc esi
test byte [ebx], 1
jne 0x4bf712
dec eax
cmp edx, eax
jne 0x4bf74b
xor eax, eax
cmp edi, 1
jle 0x4bf728
lea esp, [esp]
sar edi, 1
inc eax
cmp edi, 1
jg 0x4bf720
xor ecx, ecx
cmp esi, 1
jle 0x4bf738
nop
sar esi, 1
inc ecx
cmp esi, 1
jg 0x4bf730
mov esi, dword [esp + 0x18]
sub eax, dword [esi]
sub eax, ecx
inc eax
cmp ebp, eax
jg 0x4bf747
mov ebp, eax
xor edi, edi
xor esi, esi
mov eax, dword [esp + 0x28]
inc edx
add ebx, 0x18
cmp edx, eax
jb 0x4bf704
mov dword [esp + 0x4c], ebp
lea ebx, [ebp - 1]
test ebx, ebx
js 0x4bf77a
mov ebp, dword [esp + 0x64]
push 1
push 1
push ebp
call fcn.004d2390
add esp, 0xc
dec ebx
jns 0x4bf766
mov ebp, dword [esp + 0x4c]
push 1
push 0
push dword [esp + 0x6c]
call fcn.004d2390
mov eax, dword [esp + 0x78]
add esp, 0xc
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov ebx, dword [eax]
add dword [edx], ebp
mov ecx, dword [ecx]
lea eax, [ebx + ebx*2]
cmp ebx, dword [esp + 0x28]
jae 0x4bf800
lea ebp, [ecx + 0x14]
lea ebp, [ebp + eax*8]
lea esp, [esp]
add edi, dword [ebp - 4]
inc esi
test byte [ebp], 1
jne 0x4bf7cd
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax]
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
dec eax
add eax, ecx
cmp ebx, eax
jne 0x4bf7f6
xor ecx, ecx
cmp esi, 1
jle 0x4bf7dc
sar esi, 1
inc ecx
cmp esi, 1
jg 0x4bf7d4
mov eax, dword [edx]
add eax, ecx
push eax
push edi
push dword [esp + 0x6c]
call fcn.004d2390
mov edx, dword [esp + 0x24]
add esp, 0xc
xor edi, edi
xor esi, esi
inc ebx
add ebp, 0x18
cmp ebx, dword [esp + 0x28]
jb 0x4bf7b0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x6c]
add eax, 0x34
add dword [esp + 0x20], 0x34
add ecx, 0x34
add edx, 0x34
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
inc edx
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edx
cmp edx, dword [esp + 0x54]
jb 0x4bf626
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x40]
inc ecx
mov ebp, dword [esp + 0x34]
add eax, 0x24
jmp 0x4bf562
mov ebx, dword [esp + 0x64]
push ebx
call fcn.004d2150
add esp, 4
push ebx
test eax, eax
jne 0x4bf87a
call fcn.004d2130
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
call fcn.004d22c0
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
add esi, eax
sub ebp, eax
mov dword [esp + 0x14], esi
push ebx
mov dword [esp + 0x1c], ebp
call fcn.004d2130
mov eax, dword [esp + 0x70]
add esp, 8
test byte [eax], 4
je 0x4bf8ee
cmp ebp, 2
jae 0x4bf8db
cmp dword [esp + 0x80], 1
jne 0x4bf420
push 2
push ebp
push str.opj_t2_encode_packet__:_only__u_bytes_remaining_in_output_buffer.__u_needed._n
push 1
push dword [esp + 0x94]
call fcn.004b1600
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov word [esi], 0x92ff
add esi, 2
sub ebp, 2
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x7c]
test ebp, ebp
je 0x4bf923
cmp dword [ebp + 0xc], 0
je 0x4bf923
mov ecx, dword [ebp + 0x58]
mov eax, esi
imul esi, dword [esp + 0x60], 0x250
mov edi, dword [ebp + 8]
sub eax, dword [esp + 0x70]
shl edi, 5
cdq
mov ecx, dword [esi + ecx + 0x224]
mov dword [ecx + edi + 8], eax
mov dword [ecx + edi + 0xc], edx
mov edi, dword [esp + 0x44]
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x6c], eax
cmp eax, dword [ecx + 0x18]
jae 0x4bfa43
push edi
call fcn.004b8260
add esp, 4
test eax, eax
jne 0x4bfa1e
mov eax, dword [esp + 0x34]
lea ecx, [eax + eax*4]
mov eax, dword [edi + 0x14]
mov edx, dword [eax + ecx*8 + 0x14]
imul edx, dword [eax + ecx*8 + 0x10]
mov ebx, dword [eax + ecx*8 + 0x18]
xor eax, eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], edx
test edx, edx
je 0x4bfa1e
mov ecx, dword [esp + 0x24]
lea edi, [ebx + 0x28]
lea ecx, [ecx + ecx*2]
shl ecx, 3
add ebx, 4
mov dword [esp + 0x58], ecx
mov esi, dword [ebx]
add esi, ecx
cmp dword [esi], 0
je 0x4bfa07
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
ja 0x4bfa2f
push eax
push dword [esi + 0x10]
push dword [esp + 0x18]
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi]
add esp, 0xc
add dword [edi], eax
mov eax, dword [esi + 4]
add dword [esp + 0x10], eax
sub dword [esp + 0x14], eax
test ebp, ebp
je 0x4bf9fb
cmp dword [ebp + 0xc], 0
je 0x4bf9fb
imul ecx, dword [esp + 0x60], 0x250
mov eax, dword [ebp + 0x58]
mov edx, dword [ebp + 8]
fld qword [esi + 8]
shl edx, 5
add edx, dword [ecx + eax + 0x224]
fadd qword [edx + 0x18]
fst qword [edx + 0x18]
fcom qword [ebp]
fnstsw ax
test ah, 0x41
jne 0x4bf9f9
fstp qword [ebp]
jmp 0x4bf9fb
fstp st(0)
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x58]
inc eax
add ebx, 0x34
add edi, 0x34
mov dword [esp + 0x68], eax
cmp eax, edx
jb 0x4bf988
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x6c]
inc eax
add edi, 0x24
mov dword [esp + 0x44], edi
jmp 0x4bf929
cmp dword [esp + 0x80], 1
jne 0x4bf420
push eax
jmp 0x4bf409
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x10]
sub ecx, dword [esp + 0x70]
pop edi
add dword [eax], ecx
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret