Function at 0x4b90c0
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 0x4b9168
mov ecx, dword [esp + 0x78]
cmp ecx, 6
jae 0x4b913a
cmp dword [esp + 0x80], 1
jne 0x4b9130
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.004ab310
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 0x4b9170
mov eax, dword [esp + 0x78]
mov dword [esp + 0x14], eax
test ebx, ebx
jne 0x4b923a
mov eax, dword [esp + 0x1c]
add edi, 0x1c
mov dword [esp + 0x6c], edi
mov dword [esp + 0x64], ebx
cmp dword [eax + 0x18], ebx
jbe 0x4b9238
push edi
call fcn.004b1f70
add esp, 4
test eax, eax
jne 0x4b9217
lea ebx, [ebp*4]
add ebx, ebp
mov ebp, dword [edi + 0x14]
push dword [ebp + ebx*8 + 0x20]
call fcn.004bac80
push dword [ebp + ebx*8 + 0x24]
call fcn.004bac80
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 0x4b9213
xor edi, edi
jmp 0x4b91e0
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.004bacc0
inc esi
lea edi, [edi + 0x34]
add esp, 0xc
cmp esi, dword [esp + 0x50]
jb 0x4b91e0
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 0x4b9190
mov edi, ecx
jmp 0x4b923a
mov edi, eax
call fcn.004cbe30
mov ebx, eax
mov dword [esp + 0x64], ebx
test ebx, ebx
je 0x4b9130
mov ecx, dword [esp + 0x14]
push ecx
push dword [esp + 0x14]
push ebx
call fcn.004cbfa0
push 1
push 1
push ebx
call fcn.004cc0a0
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 0x4b9566
push eax
call fcn.004b1f70
add esp, 4
test eax, eax
jne 0x4b9551
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 0x4b92f8
add esi, 4
cmp dword [esi + 0x24], 0
jne 0x4b92f0
mov eax, dword [esp + 0x24]
lea ecx, [eax + eax*2]
mov eax, dword [esi]
cmp dword [eax + ecx*8], 0
je 0x4b92f0
push dword [esp + 0x24]
push edi
push dword [ebx + edx*8 + 0x20]
call fcn.004bacc0
mov edx, dword [esp + 0x44]
add esp, 0xc
inc edi
add esi, 0x34
cmp edi, ebp
jb 0x4b92c6
mov eax, dword [ebx + edx*8 + 0x18]
mov dword [esp + 0x30], 0
test ebp, ebp
je 0x4b954d
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 0x4b9370
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.004ba9f0
add esp, 0x10
jmp 0x4b9386
xor eax, eax
cmp dword [edx], eax
push 1
setne al
push eax
push dword [esp + 0x6c]
call fcn.004cc0a0
add esp, 0xc
mov eax, dword [esp + 0x3c]
cmp dword [eax], esi
jne 0x4b93ab
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 0x4b952a
mov eax, dword [esp + 0x6c]
cmp dword [eax], esi
jne 0x4b93da
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.004ba9f0
add esp, 0x10
mov ebx, dword [esp + 0x3c]
push dword [ebx]
push dword [esp + 0x68]
call fcn.004b9c60
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 0x4b946b
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 0x4b9422
dec eax
cmp edx, eax
jne 0x4b945b
xor eax, eax
cmp edi, 1
jle 0x4b9438
lea esp, [esp]
sar edi, 1
inc eax
cmp edi, 1
jg 0x4b9430
xor ecx, ecx
cmp esi, 1
jle 0x4b9448
nop
sar esi, 1
inc ecx
cmp esi, 1
jg 0x4b9440
mov esi, dword [esp + 0x18]
sub eax, dword [esi]
sub eax, ecx
inc eax
cmp ebp, eax
jg 0x4b9457
mov ebp, eax
xor edi, edi
xor esi, esi
mov eax, dword [esp + 0x28]
inc edx
add ebx, 0x18
cmp edx, eax
jb 0x4b9414
mov dword [esp + 0x4c], ebp
lea ebx, [ebp - 1]
test ebx, ebx
js 0x4b948a
mov ebp, dword [esp + 0x64]
push 1
push 1
push ebp
call fcn.004cc0a0
add esp, 0xc
dec ebx
jns 0x4b9476
mov ebp, dword [esp + 0x4c]
push 1
push 0
push dword [esp + 0x6c]
call fcn.004cc0a0
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 0x4b9510
lea ebp, [ecx + 0x14]
lea ebp, [ebp + eax*8]
lea esp, [esp]
add edi, dword [ebp - 4]
inc esi
test byte [ebp], 1
jne 0x4b94dd
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 0x4b9506
xor ecx, ecx
cmp esi, 1
jle 0x4b94ec
sar esi, 1
inc ecx
cmp esi, 1
jg 0x4b94e4
mov eax, dword [edx]
add eax, ecx
push eax
push edi
push dword [esp + 0x6c]
call fcn.004cc0a0
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 0x4b94c0
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 0x4b9336
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 0x4b9272
mov ebx, dword [esp + 0x64]
push ebx
call fcn.004cbe60
add esp, 4
push ebx
test eax, eax
jne 0x4b958a
call fcn.004cbe40
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
call fcn.004cbfd0
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.004cbe40
mov eax, dword [esp + 0x70]
add esp, 8
test byte [eax], 4
je 0x4b95fe
cmp ebp, 2
jae 0x4b95eb
cmp dword [esp + 0x80], 1
jne 0x4b9130
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.004ab310
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 0x4b9633
cmp dword [ebp + 0xc], 0
je 0x4b9633
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 0x4b9753
push edi
call fcn.004b1f70
add esp, 4
test eax, eax
jne 0x4b972e
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 0x4b972e
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 0x4b9717
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
ja 0x4b973f
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 0x4b970b
cmp dword [ebp + 0xc], 0
je 0x4b970b
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 0x4b9709
fstp qword [ebp]
jmp 0x4b970b
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 0x4b9698
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x6c]
inc eax
add edi, 0x24
mov dword [esp + 0x44], edi
jmp 0x4b9639
cmp dword [esp + 0x80], 1
jne 0x4b9130
push eax
jmp 0x4b9119
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