Function at 0x4bf100
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 0x4bf1a8
mov ecx, dword [esp + 0x78]
cmp ecx, 6
jae 0x4bf17a
cmp dword [esp + 0x80], 1
jne 0x4bf170
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.004b1350
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 0x4bf1b0
mov eax, dword [esp + 0x78]
mov dword [esp + 0x14], eax
test ebx, ebx
jne 0x4bf27a
mov eax, dword [esp + 0x1c]
add edi, 0x1c
mov dword [esp + 0x6c], edi
mov dword [esp + 0x64], ebx
cmp dword [eax + 0x18], ebx
jbe 0x4bf278
push edi
call fcn.004b7fb0
add esp, 4
test eax, eax
jne 0x4bf257
lea ebx, [ebp*4]
add ebx, ebp
mov ebp, dword [edi + 0x14]
push dword [ebp + ebx*8 + 0x20]
call fcn.004c0cc0
push dword [ebp + ebx*8 + 0x24]
call fcn.004c0cc0
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 0x4bf253
xor edi, edi
jmp 0x4bf220
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.004c0d00
inc esi
lea edi, [edi + 0x34]
add esp, 0xc
cmp esi, dword [esp + 0x50]
jb 0x4bf220
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 0x4bf1d0
mov edi, ecx
jmp 0x4bf27a
mov edi, eax
call fcn.004d1e70
mov ebx, eax
mov dword [esp + 0x64], ebx
test ebx, ebx
je 0x4bf170
mov ecx, dword [esp + 0x14]
push ecx
push dword [esp + 0x14]
push ebx
call fcn.004d1fe0
push 1
push 1
push ebx
call fcn.004d20e0
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 0x4bf5a6
push eax
call fcn.004b7fb0
add esp, 4
test eax, eax
jne 0x4bf591
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 0x4bf338
add esi, 4
cmp dword [esi + 0x24], 0
jne 0x4bf330
mov eax, dword [esp + 0x24]
lea ecx, [eax + eax*2]
mov eax, dword [esi]
cmp dword [eax + ecx*8], 0
je 0x4bf330
push dword [esp + 0x24]
push edi
push dword [ebx + edx*8 + 0x20]
call fcn.004c0d00
mov edx, dword [esp + 0x44]
add esp, 0xc
inc edi
add esi, 0x34
cmp edi, ebp
jb 0x4bf306
mov eax, dword [ebx + edx*8 + 0x18]
mov dword [esp + 0x30], 0
test ebp, ebp
je 0x4bf58d
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 0x4bf3b0
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.004c0a30
add esp, 0x10
jmp 0x4bf3c6
xor eax, eax
cmp dword [edx], eax
push 1
setne al
push eax
push dword [esp + 0x6c]
call fcn.004d20e0
add esp, 0xc
mov eax, dword [esp + 0x3c]
cmp dword [eax], esi
jne 0x4bf3eb
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 0x4bf56a
mov eax, dword [esp + 0x6c]
cmp dword [eax], esi
jne 0x4bf41a
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.004c0a30
add esp, 0x10
mov ebx, dword [esp + 0x3c]
push dword [ebx]
push dword [esp + 0x68]
call fcn.004bfca0
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 0x4bf4ab
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 0x4bf462
dec eax
cmp edx, eax
jne 0x4bf49b
xor eax, eax
cmp edi, 1
jle 0x4bf478
lea esp, [esp]
sar edi, 1
inc eax
cmp edi, 1
jg 0x4bf470
xor ecx, ecx
cmp esi, 1
jle 0x4bf488
nop
sar esi, 1
inc ecx
cmp esi, 1
jg 0x4bf480
mov esi, dword [esp + 0x18]
sub eax, dword [esi]
sub eax, ecx
inc eax
cmp ebp, eax
jg 0x4bf497
mov ebp, eax
xor edi, edi
xor esi, esi
mov eax, dword [esp + 0x28]
inc edx
add ebx, 0x18
cmp edx, eax
jb 0x4bf454
mov dword [esp + 0x4c], ebp
lea ebx, [ebp - 1]
test ebx, ebx
js 0x4bf4ca
mov ebp, dword [esp + 0x64]
push 1
push 1
push ebp
call fcn.004d20e0
add esp, 0xc
dec ebx
jns 0x4bf4b6
mov ebp, dword [esp + 0x4c]
push 1
push 0
push dword [esp + 0x6c]
call fcn.004d20e0
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 0x4bf550
lea ebp, [ecx + 0x14]
lea ebp, [ebp + eax*8]
lea esp, [esp]
add edi, dword [ebp - 4]
inc esi
test byte [ebp], 1
jne 0x4bf51d
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 0x4bf546
xor ecx, ecx
cmp esi, 1
jle 0x4bf52c
sar esi, 1
inc ecx
cmp esi, 1
jg 0x4bf524
mov eax, dword [edx]
add eax, ecx
push eax
push edi
push dword [esp + 0x6c]
call fcn.004d20e0
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 0x4bf500
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 0x4bf376
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 0x4bf2b2
mov ebx, dword [esp + 0x64]
push ebx
call fcn.004d1ea0
add esp, 4
push ebx
test eax, eax
jne 0x4bf5ca
call fcn.004d1e80
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
call fcn.004d2010
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.004d1e80
mov eax, dword [esp + 0x70]
add esp, 8
test byte [eax], 4
je 0x4bf63e
cmp ebp, 2
jae 0x4bf62b
cmp dword [esp + 0x80], 1
jne 0x4bf170
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.004b1350
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 0x4bf673
cmp dword [ebp + 0xc], 0
je 0x4bf673
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 0x4bf793
push edi
call fcn.004b7fb0
add esp, 4
test eax, eax
jne 0x4bf76e
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 0x4bf76e
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 0x4bf757
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
ja 0x4bf77f
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 0x4bf74b
cmp dword [ebp + 0xc], 0
je 0x4bf74b
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 0x4bf749
fstp qword [ebp]
jmp 0x4bf74b
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 0x4bf6d8
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x6c]
inc eax
add edi, 0x24
mov dword [esp + 0x44], edi
jmp 0x4bf679
cmp dword [esp + 0x80], 1
jne 0x4bf170
push eax
jmp 0x4bf159
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